Implement skipper interface

This commit is contained in:
Nikita Tokarchuk
2019-01-25 01:07:27 +01:00
parent 5a3ee358b5
commit 704ce76c11
5 changed files with 37 additions and 0 deletions
+1
View File
@@ -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 {
+1
View File
@@ -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 {