Skip to content

Commit

Permalink
return real count when limit = 0
Browse files Browse the repository at this point in the history
  • Loading branch information
dirac-lee committed Jun 8, 2023
1 parent 1e63fba commit 53498e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gdal.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func (gdal *GDAL[PO, Where, Update]) MQueryByPagingOpt(ctx context.Context, wher
}
opt := MakeQueryConfig(options)
if opt.Limit != nil && *opt.Limit == 0 { // skip query when limit = 0
return nil, 0, err
return nil, count, err
}

var pos []*PO
Expand Down

0 comments on commit 53498e8

Please sign in to comment.