getCollection

inline fun <T : Any> MongoDatabase.getCollection(collectionName: String): MongoCollection<T>

Gets a collection.

Return

the collection

Parameters

collectionName

the name of the collection to return

the default target type of the collection to return

inline fun <T : Any> MongoDatabase.getCollection(): MongoCollection<T>

Gets a collection.

Return

the collection

Parameters

the default target type of the collection to return - the name of the collection is determined by [defaultCollectionName]

See also