MCPcopy
hub / github.com/jmoiron/sqlx / Get

Function Get

sqlx.go:691–694  ·  sqlx.go::Get

Get does a QueryRow using the provided Queryer, and scans the resulting row to dest. If dest is scannable, the result must only have one column. Otherwise, StructScan is used. Get will return sql.ErrNoRows like row.Scan would. Any placeholder parameters are replaced with supplied args. An error i

(q Queryer, dest interface{}, query string, args ...interface{})

Source from the content-addressed store, hash-verified

689// Any placeholder parameters are replaced with supplied args.
690// An error is returned if the result set is empty.
691func Get(q Queryer, dest interface{}, query string, args ...interface{}) error {
692 r := q.QueryRowx(query, args...)
693 return r.scanAny(dest, false)
694}
695
696// LoadFile exec's every statement in a file (as a single call to Exec).
697// LoadFile may return a nil *sql.Result if errors are encountered locating or

Callers 3

GetMethod · 0.85
GetMethod · 0.85
GetMethod · 0.85

Calls 2

scanAnyMethod · 0.80
QueryRowxMethod · 0.65

Tested by

no test coverage detected