kmongo / org.litote.kmongo.coroutine / CoroutineDatabase / createCollection

createCollection

suspend fun createCollection(collectionName: String, options: CreateCollectionOptions = CreateCollectionOptions()): <ERROR CLASS> (source)

Create a new collection with the selected options

Parameters

collectionName - the name for the new collection to create

options - various options for creating the collection

Mongodb
.driver.manual reference/commands/create Create Command

suspend fun createCollection(clientSession: ClientSession, collectionName: String, options: CreateCollectionOptions = CreateCollectionOptions()): <ERROR CLASS> (source)

Create a new collection with the selected options

Parameters

clientSession - the client session with which to associate this operation

collectionName - the name for the new collection to create

options - various options for creating the collection

Mongodb
.driver.manual reference/commands/create Create Command