Create query spec documentation
This commit is contained in:
parent
a2892425d6
commit
50b3a3c536
6 changed files with 74 additions and 15 deletions
internal/generator
|
@ -215,8 +215,10 @@ func (r *UserRepositoryMongo) FindByID(arg0 context.Context, arg1 primitive.Obje
|
|||
|
||||
func (r *UserRepositoryMongo) FindByGenderNotAndAgeLessThan(arg0 context.Context, arg1 Gender, arg2 int) (*UserModel, error) {
|
||||
cursor, err := r.collection.Find(arg0, bson.M{
|
||||
"gender": bson.M{"$ne": arg1},
|
||||
"age": bson.M{"$lt": arg2},
|
||||
"$and": []bson.M{
|
||||
{"gender": bson.M{"$ne": arg1}},
|
||||
{"age": bson.M{"$lt": arg2}},
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue