Skip to content

MongoDB request DSLopensavvy.ktmongo.dsl.queryFilterQueryeq

eq

open infix fun <V> Field<T, V>.eq(value: V)

Matches documents where the value of a field equals the value.

Example

class User(
    val name: String?,
    val age: Int,
)

collection.find {
    User::name eq "foo"
}

External resources

open infix fun <V> KProperty1<T, V>.eq(value: V)

Matches documents where the value of a field equals the value.

Example

class User(
    val name: String?,
    val age: Int,
)

collection.find {
    User::name eq "foo"
}

External resources