kmongo / org.litote.kmongo / com.mongodb.client.MongoCollection / find

find

fun <T> MongoCollection<T>.find(filter: String = KMongoUtil.EMPTY_JSON): FindIterable<T> (source)

Finds all documents in the collection.

Parameters

filter - the query filter

Return
the find iterable interface

fun <T> MongoCollection<T>.find(vararg filters: Bson?): FindIterable<T> (source)

Finds all documents in the collection.

Parameters

filters - the query filters

Return
the find iterable interface

fun <T> MongoCollection<T>.find(clientSession: ClientSession, filter: String = KMongoUtil.EMPTY_JSON): FindIterable<T> (source)

Finds all documents in the collection.

Parameters

clientSession - the client session with which to associate this operation

filter - the query filter

Return
the find iterable interface

fun <T> MongoCollection<T>.find(clientSession: ClientSession, vararg filters: Bson?): FindIterable<T> (source)

Finds all documents in the collection.

Parameters

clientSession - the client session with which to associate this operation

filters - the query filters

Return
the find iterable interface