kmongo / org.litote.kmongo.coroutine / CoroutineDatabase / getCollection

getCollection

fun <reified TDocument : Any> getCollection(collectionName: String = KMongoUtil.defaultCollectionName(TDocument::class)): CoroutineCollection<TDocument> (source)

Gets a collection, with a specific default document class.

Parameters

collectionName - the name of the collection to return

clazz - the default class to cast any documents returned from the database into.

Parameters

Return
the collection