fun and(filters: Iterable<Bson?>): Bson
(source)fun and(vararg filters: Bson?): Bson
(source)
Creates a filter that performs a logical AND of the provided list of filters. Note that this will only generate a "$and" operator if absolutely necessary, as the query language implicity ands together all the keys. In other words, a query expression like:
will generate a MongoDB query like:
filters
- the list of filters to and together
Return
the filter
Mongodb
.driver.manual reference/operator/query/and $and