-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a828270
commit 0c6e2b0
Showing
6 changed files
with
113 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package limit | ||
|
||
// Limit represents abstract limit | ||
type Limit interface { | ||
Get() uint | ||
} | ||
|
||
// limit represents the limit of a database query | ||
type limit struct { | ||
value uint | ||
} | ||
|
||
// Get returns the limit to a query | ||
func (l limit) Get() uint { | ||
return l.value | ||
} | ||
|
||
// NewLimit returns a new Limit object | ||
func NewLimit(l uint) Limit { | ||
return &limit{value: l} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package offset | ||
|
||
// Offset represents abstract offset | ||
type Offset interface { | ||
Get() uint | ||
} | ||
|
||
// offset represents the offset of a database query | ||
type offset struct { | ||
value uint | ||
} | ||
|
||
// Get returns the offset to a query | ||
func (l offset) Get() uint { | ||
return l.value | ||
} | ||
|
||
// NewOffset returns a new Offset object | ||
func NewOffset(value uint) Offset { | ||
return &offset{value: value} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters