QRM returns qrm.ErrNoRows when scanning into struct destination and query result set is empty.
This commit is contained in:
parent
0b00a6b12c
commit
15acb1c326
3 changed files with 9 additions and 7 deletions
|
|
@ -16,11 +16,11 @@ type Statement interface {
|
|||
|
||||
// Query executes statement over database connection db and stores row result in destination.
|
||||
// Destination can be either pointer to struct or pointer to a slice.
|
||||
// If destination is pointer to struct and query result set is empty, method returns sql.ErrNoRows.
|
||||
// If destination is pointer to struct and query result set is empty, method returns qrm.ErrNoRows.
|
||||
Query(db qrm.DB, destination interface{}) error
|
||||
// QueryContext executes statement with a context over database connection db and stores row result in destination.
|
||||
// Destination can be either pointer to struct or pointer to a slice.
|
||||
// If destination is pointer to struct and query result set is empty, method returns sql.ErrNoRows.
|
||||
// If destination is pointer to struct and query result set is empty, method returns qrm.ErrNoRows.
|
||||
QueryContext(context context.Context, db qrm.DB, destination interface{}) error
|
||||
|
||||
//Exec executes statement over db connection without returning any rows.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue