MongoDB request DSL • opensavvy.ktmongo.dsl.query • FilterQuery • nor
nor¶
abstract fun nor(block: FilterQuery<T>.() -> Unit)
Performs a logical NOR
operation on one or more expressions, and selects the documents that do not satisfy any of the expressions.
Example¶
class User(
val name: String?,
val age: Int,
)
collection.find {
nor {
User::name eq "foo"
User::name eq "bar"
User::age eq 18
}
}
External resources¶
See also¶
-
FilterQuery.and
LogicalAND
operation. -
FilterQuery.or
LogicalOR
operation.