GetContext 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 e
(ctx context.Context, q QueryerContext, dest interface{}, query string, args ...interface{})
| 80 | // row.Scan would. Any placeholder parameters are replaced with supplied args. |
| 81 | // An error is returned if the result set is empty. |
| 82 | func GetContext(ctx context.Context, q QueryerContext, dest interface{}, query string, args ...interface{}) error { |
| 83 | r := q.QueryRowxContext(ctx, query, args...) |
| 84 | return r.scanAny(dest, false) |
| 85 | } |
| 86 | |
| 87 | // LoadFileContext exec's every statement in a file (as a single call to Exec). |
| 88 | // LoadFileContext may return a nil *sql.Result if errors are encountered |
no test coverage detected