Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoRows = errors.New("qrm: no rows in result set")
ErrNoRows is returned by Query when query result set is empty
Functions ¶
func Query ¶
Query executes Query Result Mapping (QRM) of `query` with list of parametrized arguments `arg` over database connection `db` using context `ctx` into destination `destPtr`. Destination can be either pointer to struct or pointer to slice of structs. If destination is pointer to struct and query result set is empty, method returns qrm.ErrNoRows.
Types ¶
type DB ¶
type DB interface { Exec(query string, args ...interface{}) (sql.Result, error) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error) Query(query string, args ...interface{}) (*sql.Rows, error) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) }
DB is common database interface used by jet execution
Click to show internal directories.
Click to hide internal directories.