Skip to content

Commit 2c4c847

Browse files
Dragomir-Ivanovrs
authored andcommitted
Use "Skip" even if no "Limit" is specified (#159)
1 parent 884a129 commit 2c4c847

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

schema/query/window.go

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ type Window struct {
1414
// Page creates a Window using pagination.
1515
func Page(page, perPage, skip int) *Window {
1616
if perPage < 0 {
17+
if skip > 0 {
18+
return &Window{Offset: skip, Limit: perPage}
19+
}
1720
return nil
1821
}
1922
if page < 1 {

0 commit comments

Comments
 (0)