Files
mattermost/vendor/github.com/Masterminds/squirrel/row.go
Jesse Hallam 2c3a2e9235 Query builder (#10104)
* add query builder to facilitate dynamic SQL construction

* leverage query builder to refactor user store

This is partially setup work for MM-13120, but merged to master to avoid
further conflicts.

* fix unrelated unit test breakage

* documentation tweaks

* Apply suggestions from code review

Co-Authored-By: lieut-data <jesse.hallam@gmail.com>

* prefer comma separated case options to fallthrough

* vendor github.com/Masterminds/squirrel and deps

* switch to using github.com/Masterminds/squirrel

* rm querybuilder
2019-01-29 15:24:57 -05:00

23 lines
472 B
Go

package squirrel
// RowScanner is the interface that wraps the Scan method.
//
// Scan behaves like database/sql.Row.Scan.
type RowScanner interface {
Scan(...interface{}) error
}
// Row wraps database/sql.Row to let squirrel return new errors on Scan.
type Row struct {
RowScanner
err error
}
// Scan returns Row.err or calls RowScanner.Scan.
func (r *Row) Scan(dest ...interface{}) error {
if r.err != nil {
return r.err
}
return r.RowScanner.Scan(dest...)
}