find

fun <T : Any> MongoCollection<T>.find(filter: String = KMongoUtil.EMPTY_JSON): FindFlow<T>

Finds all documents in the collection.

Return

the find iterable interface

Parameters

filter

the query filter


fun <T : Any> MongoCollection<T>.find(vararg filters: Bson?): FindFlow<T>

Finds all documents in the collection.

Return

the find iterable interface

Parameters

filters

the query filters


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

Finds all documents in the collection.

Return

the find iterable interface

Parameters

clientSession

the client session with which to associate this operation

filter

the query filter


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

Finds all documents in the collection.

Return

the find iterable interface

Parameters

clientSession

the client session with which to associate this operation

filters

the query filters