pullValues
abstract fun <V> Field<T, Collection<V>>.pullValues(predicate: FilterQueryPredicate<V>.() -> Unit, type: KType)(source)
infix inline fun <V> Field<T, Collection<V>>.pullValues(noinline predicate: FilterQueryPredicate<V>.() -> Unit)(source)
infix inline fun <V> KProperty1<T, Collection<V>>.pullValues(noinline predicate: FilterQueryPredicate<V>.() -> Unit)(source)
Removes all items of an array that match predicate.
To select items based on a value of one or multiple of their fields, see pull.
Example
class User(
val name: String,
val tests: List<Int>,
)
users.updateOne(
filter = { User::name eq "Paul" },
update = {
User::tests pullValues { lte(10) }
}
)Content copied to clipboard