find

@JvmName(name = "findAsT")
fun find(filter: Bson = BsonDocument()): FindFlow<T>

Finds all documents in the collection.

Return

the find iterable interface

Parameters

filter

the query filter

See also


inline fun <R : Any> find(filter: Bson = BsonDocument()): FindFlow<R>

Finds all documents in the collection.

Return

the find iterable interface

Parameters

R

the class to decode each document into

filter

the query filter

See also


@JvmName(name = "findAsTWithSession")
fun find(clientSession: ClientSession, filter: Bson = BsonDocument()): 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

See also


inline fun <R : Any> find(clientSession: ClientSession, filter: Bson = BsonDocument()): FindFlow<R>

Finds all documents in the collection.

Return

the find iterable interface

Parameters

R

the class to decode each document into

clientSession

the client session with which to associate this operation

filter

the query filter

See also


fun <R : Any> find(filter: Bson = BsonDocument(), resultClass: Class<R>): FindFlow<R>

Finds all documents in the collection.

Return

the find iterable interface

Parameters

R

the class to decode each document into

filter

the query filter

resultClass

the target document type of the iterable.

See also


fun <R : Any> find(clientSession: ClientSession, filter: Bson = BsonDocument(), resultClass: Class<R>): FindFlow<R>

Finds all documents in the collection.

Return

the find iterable interface

Parameters

R

the class to decode each document into

clientSession

the client session with which to associate this operation

filter

the query filter

resultClass

the target document type of the iterable.

See also