func sqlize(q sq.Sqlizer) (sql string, args []interface{}) { sql, args, _ = q.ToSql() if Debug { log.Printf("y/db: SQL: %s, args: %#v", sql, args) } return }
// build converts the provided sql builder `b` into the sql and args to execute // against the raw database connections. func (r *Repo) build(b sq.Sqlizer) (sql string, args []interface{}, err error) { sql, args, err = b.ToSql() if err != nil { err = errors.Wrap(err, "to-sql failed") } return }