@@ -7,16 +7,16 @@ import (
7
7
"reflect"
8
8
)
9
9
10
- func NewSearchLoaderWithQueryAndSort (db * mongo.Database , collection string , modelType reflect.Type , buildQuery func (interface {}) (bson.M , bson.M ), getSort func (interface {}) string , buildSort func (string , reflect.Type ) bson.M , options ... func (context.Context , interface {}) (interface {}, error )) (* Searcher , * Loader ) {
10
+ func NewSearchLoaderWithQueryAndSort (db * mongo.Database , collection string , modelType reflect.Type , buildQuery func (interface {}) (bson.D , bson.M ), getSort func (interface {}) string , buildSort func (string , reflect.Type ) bson.D , options ... func (context.Context , interface {}) (interface {}, error )) (* Searcher , * Loader ) {
11
11
return NewMongoSearchLoaderWithQueryAndSort (db , collection , modelType , false , buildQuery , getSort , buildSort , options ... )
12
12
}
13
- func NewMongoSearchLoaderWithQuery (db * mongo.Database , collection string , modelType reflect.Type , idObjectId bool , buildQuery func (interface {}) (bson.M , bson.M ), getSort func (interface {}) string , options ... func (context.Context , interface {}) (interface {}, error )) (* Searcher , * Loader ) {
13
+ func NewMongoSearchLoaderWithQuery (db * mongo.Database , collection string , modelType reflect.Type , idObjectId bool , buildQuery func (interface {}) (bson.D , bson.M ), getSort func (interface {}) string , options ... func (context.Context , interface {}) (interface {}, error )) (* Searcher , * Loader ) {
14
14
return NewMongoSearchLoaderWithQueryAndSort (db , collection , modelType , idObjectId , buildQuery , getSort , BuildSort , options ... )
15
15
}
16
- func NewSearchLoaderWithQuery (db * mongo.Database , collection string , modelType reflect.Type , buildQuery func (interface {}) (bson.M , bson.M ), getSort func (interface {}) string , options ... func (context.Context , interface {}) (interface {}, error )) (* Searcher , * Loader ) {
16
+ func NewSearchLoaderWithQuery (db * mongo.Database , collection string , modelType reflect.Type , buildQuery func (interface {}) (bson.D , bson.M ), getSort func (interface {}) string , options ... func (context.Context , interface {}) (interface {}, error )) (* Searcher , * Loader ) {
17
17
return NewMongoSearchLoaderWithQueryAndSort (db , collection , modelType , false , buildQuery , getSort , BuildSort , options ... )
18
18
}
19
- func NewMongoSearchLoaderWithQueryAndSort (db * mongo.Database , collection string , modelType reflect.Type , idObjectId bool , buildQuery func (interface {}) (bson.M , bson.M ), getSort func (interface {}) string , buildSort func (string , reflect.Type ) bson.M , options ... func (context.Context , interface {}) (interface {}, error )) (* Searcher , * Loader ) {
19
+ func NewMongoSearchLoaderWithQueryAndSort (db * mongo.Database , collection string , modelType reflect.Type , idObjectId bool , buildQuery func (interface {}) (bson.D , bson.M ), getSort func (interface {}) string , buildSort func (string , reflect.Type ) bson.D , options ... func (context.Context , interface {}) (interface {}, error )) (* Searcher , * Loader ) {
20
20
var mp func (context.Context , interface {}) (interface {}, error )
21
21
if len (options ) > 0 && options [0 ] != nil {
22
22
mp = options [0 ]
0 commit comments