diff --git a/cursortoken/token.go b/cursortoken/token.go index c595241..c00176f 100644 --- a/cursortoken/token.go +++ b/cursortoken/token.go @@ -11,6 +11,7 @@ import ( type CursorToken interface { Token() string + IsEnd() bool } type Mode string diff --git a/cursortoken/tokenKeySort.go b/cursortoken/tokenKeySort.go index cead3ed..a7f132d 100644 --- a/cursortoken/tokenKeySort.go +++ b/cursortoken/tokenKeySort.go @@ -111,6 +111,10 @@ func (c CTKeySort) Token() string { return "tok_" + base32.StdEncoding.EncodeToString(body) } +func (c CTKeySort) IsEnd() bool { + return c.Mode == CTMEnd +} + func (c CTKeySort) valuePrimaryObjectId() (primitive.ObjectID, bool) { if oid, err := primitive.ObjectIDFromHex(c.ValuePrimary); err == nil { return oid, true diff --git a/cursortoken/tokenPaginate.go b/cursortoken/tokenPaginate.go index 0505d6e..1f3005c 100644 --- a/cursortoken/tokenPaginate.go +++ b/cursortoken/tokenPaginate.go @@ -31,3 +31,7 @@ func (c CTPaginated) Token() string { return "$" + strconv.Itoa(c.Page) } + +func (c CTPaginated) IsEnd() bool { + return c.Mode == CTMEnd +} diff --git a/goextVersion.go b/goextVersion.go index 23daf3f..a3895c8 100644 --- a/goextVersion.go +++ b/goextVersion.go @@ -1,5 +1,5 @@ package goext -const GoextVersion = "0.0.538" +const GoextVersion = "0.0.539" -const GoextVersionTimestamp = "2024-10-27T02:18:45+0200" +const GoextVersionTimestamp = "2024-10-27T02:21:35+0200"