v0.0.547 allow calling ListWithCount with pageSize=0
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 2m55s
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 2m55s
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
|
||||
type CursorToken interface {
|
||||
Token() string
|
||||
IsStart() bool
|
||||
IsEnd() bool
|
||||
}
|
||||
|
||||
|
@@ -115,6 +115,10 @@ func (c CTKeySort) IsEnd() bool {
|
||||
return c.Mode == CTMEnd
|
||||
}
|
||||
|
||||
func (c CTKeySort) IsStart() bool {
|
||||
return c.Mode == CTMStart
|
||||
}
|
||||
|
||||
func (c CTKeySort) valuePrimaryObjectId() (primitive.ObjectID, bool) {
|
||||
if oid, err := primitive.ObjectIDFromHex(c.ValuePrimary); err == nil {
|
||||
return oid, true
|
||||
|
@@ -35,3 +35,7 @@ func (c CTPaginated) Token() string {
|
||||
func (c CTPaginated) IsEnd() bool {
|
||||
return c.Mode == CTMEnd
|
||||
}
|
||||
|
||||
func (c CTPaginated) IsStart() bool {
|
||||
return c.Mode == CTMStart || c.Page == 1
|
||||
}
|
||||
|
Reference in New Issue
Block a user