Skip to content

Commit

Permalink
Fix limit max
Browse files Browse the repository at this point in the history
  • Loading branch information
tstirrat15 committed Sep 11, 2024
1 parent c8150ef commit 54cba16
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/datastore/common/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,11 @@ func (tqs QueryExecutor) ExecuteQuery(
}

var limit uint64
limit = math.MaxUint64
// NOTE: we use a uint here because it lines up with the
// assignments in this function, but we set it to MaxInt64
// because that's the biggest value that postgres and friends
// treat as valid.
limit = math.MaxInt64
if queryOpts.Limit != nil {
limit = *queryOpts.Limit
}
Expand Down

0 comments on commit 54cba16

Please sign in to comment.