listCollections

@JvmName(name = "listCollectionsAsDocument")
fun listCollections(): ListCollectionsIterable<Document>

Gets all the collections in this database.

Return

the list collections iterable interface

See also

(https://www.mongodb.com/docs/manual/reference/command/listCollections)


Gets all the collections in this database.

Return

the list collections iterable interface

Parameters

T

the type of the class to use

See also

(https://www.mongodb.com/docs/manual/reference/command/listCollections)


@JvmName(name = "listCollectionsAsDocumentWithSession")
fun listCollections(clientSession: ClientSession): ListCollectionsIterable<Document>

Gets all the collections in this database.

Return

the list collections iterable interface

Parameters

clientSession

the client session with which to associate this operation

See also

(https://www.mongodb.com/docs/manual/reference/command/listCollections)


inline fun <T : Any> listCollections(clientSession: ClientSession): ListCollectionsIterable<T>

Gets all the collections in this database.

Return

the list collections iterable interface

Parameters

clientSession

the client session with which to associate this operation

T

the type of the class to use

See also

(https://www.mongodb.com/docs/manual/reference/command/listCollections)


Gets all the collections in this database.

Return

the list collections iterable interface

Parameters

T

the type of the class to use

resultClass

the target document type of the iterable.

See also

(https://www.mongodb.com/docs/manual/reference/command/listCollections)


fun <T : Any> listCollections(clientSession: ClientSession, resultClass: Class<T>): ListCollectionsIterable<T>

Gets all the collections in this database.

Return

the list collections iterable interface

Parameters

T

the type of the class to use

clientSession

the client session with which to associate this operation

resultClass

the target document type of the iterable.

See also

(https://www.mongodb.com/docs/manual/reference/command/listCollections)