Skip to content

Commit

Permalink
Document when NoData error is not returned. (#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
fmoor authored Feb 1, 2024
1 parent 2a31436 commit 4ee5a78
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion internal/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,8 @@ func (p *Client) Query(

// QuerySingle runs a singleton-returning query and returns its element.
// If the query executes successfully but doesn't return a result
// a NoDataError is returned.
// a NoDataError is returned. If the out argument is an optional type the out
// argument will be set to missing instead of returning a NoDataError.
func (p *Client) QuerySingle(
ctx context.Context,
cmd string,
Expand Down
3 changes: 2 additions & 1 deletion internal/client/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ func (t *Tx) Query(

// QuerySingle runs a singleton-returning query and returns its element.
// If the query executes successfully but doesn't return a result
// a NoDataError is returned.
// a NoDataError is returned. If the out argument is an optional type the out
// argument will be set to missing instead of returning a NoDataError.
func (t *Tx) QuerySingle(
ctx context.Context,
cmd string,
Expand Down

0 comments on commit 4ee5a78

Please sign in to comment.