Skip to content

Commit

Permalink
[WTEL-4049]: fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Yehor Datsenko committed Nov 30, 2023
1 parent 532c2af commit 246755d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion storage/postgres/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,10 @@ func (c *Log) GetQueryBaseFromSearchOptions(opt *model.SearchOptions) sq.SelectB
if offset < 0 {
offset = 0
}
return base.Offset(uint64(offset)).Limit(uint64(opt.Size + 1))
if opt.Size != 0 {
base = base.Limit(uint64(opt.Size + 1))
}
return base.Offset(uint64(offset))
}

func (c *Log) GetQueryBase(fields []string) sq.SelectBuilder {
Expand Down

0 comments on commit 246755d

Please sign in to comment.