listCollections

@JvmName(name = "listCollectionsAsDocument")
fun listCollections(): ListCollectionsFlow<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): ListCollectionsFlow<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): ListCollectionsFlow<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)


fun <T : Any> listCollections(resultClass: Class<T>): ListCollectionsFlow<T>

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>): ListCollectionsFlow<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)