MongoDB request DSL • opensavvy.ktmongo.dsl.query • FilterQueryPredicate • isOneOf
isOneOf¶
abstract fun isOneOf(values: Collection<T>)
Selects documents for which this field is equal to one of the given values
.
Example¶
class User(
val name: String,
val age: Int?,
)
collection.find {
User::name {
isOneOf(listOf("Alfred", "Arthur"))
}
}