Skip to content

Commit

Permalink
更新到v3.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
admpub committed May 8, 2021
1 parent 03799ab commit 9d3207d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/sqladapter/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,14 @@ func (r *Result) All(dst interface{}) error {

// One fetches only one Result from the set.
func (r *Result) One(dst interface{}) error {
query, err := r.buildPaginator()
one := r.Limit(1).(*Result)
query, err := one.buildPaginator()
if err != nil {
r.setErr(err)
one.setErr(err)
return err
}
err = query.Iterator().One(dst)
r.setErr(err)
one.setErr(err)
return err
}

Expand Down

0 comments on commit 9d3207d

Please sign in to comment.