exec access
This commit is contained in:
parent
e320efd70e
commit
0b5df45a02
@ -279,10 +279,11 @@ func (m *MongoDB) Search(filters *dbs.Filters, collection_name string) (*mongo.C
|
|||||||
}
|
}
|
||||||
if len(orList) > 0 && len(andList) == 0 {
|
if len(orList) > 0 && len(andList) == 0 {
|
||||||
f = bson.D{{"$or", orList}}
|
f = bson.D{{"$or", orList}}
|
||||||
} else if len(orList) == 0 && len(andList) > 0 {
|
} else {
|
||||||
|
if len(orList) > 0 {
|
||||||
|
andList = append(andList, bson.M{"$or": orList})
|
||||||
|
}
|
||||||
f = bson.D{{"$and", andList}}
|
f = bson.D{{"$and", andList}}
|
||||||
} else if len(orList) > 0 && len(andList) > 0 {
|
|
||||||
f = bson.D{{"$and", andList}, {"$or", orList}}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user