Closed michael2m closed 7 years ago
thanks @michael2m! I'll check ASAP
Hi @michael2m!
You're right, sql.DB
does not implement QueryRow()
. But you can wrap it in order to provide necessary functionality. The wrapper may look like this:
type SqlWrapper struct {
db *sql.DB
}
func (w SqlWrapper) QueryRow(query string, args ...interface{}) RowScanner {
return w.db.QueryRow(query, args...)
}
Acceptable.
closing for now
Executing QueryRow() against a SelectBuilder doesn't work for MySQL, because it is not a QueryRower.