mirror of
https://github.com/mainnika/mongox-go-driver.git
synced 2026-05-23 00:03:36 +00:00
Implement skipper interface
This commit is contained in:
@@ -38,6 +38,7 @@ func LoadArray(db *mongox.Database, target interface{}, filters ...interface{})
|
||||
|
||||
opts.Sort = composed.Sorter()
|
||||
opts.Limit = composed.Limiter()
|
||||
opts.Skip = composed.Skipper()
|
||||
|
||||
result, err := collection.Find(db.Context(), composed.M(), opts)
|
||||
if err != nil {
|
||||
|
||||
@@ -49,6 +49,7 @@ func LoadMany(db *mongox.Database, target interface{}, filters ...interface{}) (
|
||||
|
||||
opts.Sort = composed.Sorter()
|
||||
opts.Limit = composed.Limiter()
|
||||
opts.Skip = composed.Skipper()
|
||||
|
||||
cursor, err := collection.Find(db.Context(), composed.M(), opts)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user