get Collection
Gets a collection.
Return
the collection
See also
com. mongodb. Mongo Namespace
Parameters
name
the name of the collection to return
Throws
if collectionName is invalid
abstract fun <TDocument : Any> getCollection(name: String, documentClass: KClass<TDocument>): MongoCollection<TDocument>
Content copied to clipboard
Gets a collection, with a specific default document class.
Return
the collection
Parameters
name
the name of the collection to return
document Class
the default class to cast any documents returned from the database into.