vertx / io.vertx.kotlin.ext.mongo / io.vertx.ext.mongo.MongoClient

### Extensions for io.vertx.ext.mongo.MongoClient

bulkWriteAwait | `suspend fun MongoClient.bulkWriteAwait(collection: String, operations: List<BulkOperation>): MongoClientBulkWriteResult` Execute a bulk operation. Can insert, update, replace, and/or delete multiple documents with one request.
bulkWriteWithOptionsAwait | `suspend fun MongoClient.bulkWriteWithOptionsAwait(collection: String, operations: List<BulkOperation>, bulkWriteOptions: BulkWriteOptions): MongoClientBulkWriteResult` Execute a bulk operation with the specified write options. Can insert, update, replace, and/or delete multiple documents with one request.
countAwait | `suspend fun MongoClient.countAwait(collection: String, query: JsonObject): Long` Count matching documents in a collection.
createCollectionAwait | `suspend fun MongoClient.createCollectionAwait(collectionName: String): Unit` Create a new collection
createIndexAwait | `suspend fun MongoClient.createIndexAwait(collection: String, key: JsonObject): Unit` Creates an index.
createIndexWithOptionsAwait | `suspend fun MongoClient.createIndexWithOptionsAwait(collection: String, key: JsonObject, options: IndexOptions): Unit` Creates an index.
distinctAwait | `suspend fun MongoClient.distinctAwait(collection: String, fieldName: String, resultClassname: String): JsonArray` Gets the distinct values of the specified field name. Return a JsonArray containing distinct values (eg: 1,89)
distinctWithQueryAwait | `suspend fun MongoClient.distinctWithQueryAwait(collection: String, fieldName: String, resultClassname: String, query: JsonObject): JsonArray` Gets the distinct values of the specified field name filtered by specified query. Return a JsonArray containing distinct values (eg: 1,89)
dropCollectionAwait | `suspend fun MongoClient.dropCollectionAwait(collection: String): Unit` Drop a collection
dropIndexAwait | `suspend fun MongoClient.dropIndexAwait(collection: String, indexName: String): Unit` Drops the index given its name.
findAwait | `suspend fun MongoClient.findAwait(collection: String, query: JsonObject): List<JsonObject>` Find matching documents in the specified collection
findOneAndDeleteAwait | `suspend fun MongoClient.findOneAndDeleteAwait(collection: String, query: JsonObject): JsonObject` Find a single matching document in the specified collection and delete it.
findOneAndDeleteWithOptionsAwait | `suspend fun MongoClient.findOneAndDeleteWithOptionsAwait(collection: String, query: JsonObject, findOptions: FindOptions): JsonObject` Find a single matching document in the specified collection and delete it.
findOneAndReplaceAwait | `suspend fun MongoClient.findOneAndReplaceAwait(collection: String, query: JsonObject, replace: JsonObject): JsonObject` Find a single matching document in the specified collection and replace it.
findOneAndReplaceWithOptionsAwait | `suspend fun MongoClient.findOneAndReplaceWithOptionsAwait(collection: String, query: JsonObject, replace: JsonObject, findOptions: FindOptions, updateOptions: UpdateOptions): JsonObject` Find a single matching document in the specified collection and replace it.
findOneAndUpdateAwait | `suspend fun MongoClient.findOneAndUpdateAwait(collection: String, query: JsonObject, update: JsonObject): JsonObject` Find a single matching document in the specified collection and update it.
findOneAndUpdateWithOptionsAwait | `suspend fun MongoClient.findOneAndUpdateWithOptionsAwait(collection: String, query: JsonObject, update: JsonObject, findOptions: FindOptions, updateOptions: UpdateOptions): JsonObject` Find a single matching document in the specified collection and update it.
findOneAwait | `suspend fun MongoClient.findOneAwait(collection: String, query: JsonObject, fields: JsonObject): JsonObject` Find a single matching document in the specified collection
findWithOptionsAwait | `suspend fun MongoClient.findWithOptionsAwait(collection: String, query: JsonObject, options: FindOptions): List<JsonObject>` Find matching documents in the specified collection, specifying options
getCollectionsAwait | `suspend fun MongoClient.getCollectionsAwait(): List<String>` Get a list of all collections in the database.
insertAwait | `suspend fun MongoClient.insertAwait(collection: String, document: JsonObject): String` Insert a document in the specified collection
insertWithOptionsAwait | `suspend fun MongoClient.insertWithOptionsAwait(collection: String, document: JsonObject, writeOption: WriteOption): String` Insert a document in the specified collection with the specified write option
listIndexesAwait | `suspend fun MongoClient.listIndexesAwait(collection: String): JsonArray` Get all the indexes in this collection.
removeDocumentAwait | `suspend fun MongoClient.removeDocumentAwait(collection: String, query: JsonObject): MongoClientDeleteResult` Remove a single matching document from a collection and return the handler with MongoClientDeleteResult result
removeDocumentWithOptionsAwait | `suspend fun MongoClient.removeDocumentWithOptionsAwait(collection: String, query: JsonObject, writeOption: WriteOption): MongoClientDeleteResult` Remove a single matching document from a collection with the specified write option and return the handler with MongoClientDeleteResult result
removeDocumentsAwait | `suspend fun MongoClient.removeDocumentsAwait(collection: String, query: JsonObject): MongoClientDeleteResult` Remove matching documents from a collection and return the handler with MongoClientDeleteResult result
removeDocumentsWithOptionsAwait | `suspend fun MongoClient.removeDocumentsWithOptionsAwait(collection: String, query: JsonObject, writeOption: WriteOption): MongoClientDeleteResult` Remove matching documents from a collection with the specified write option and return the handler with MongoClientDeleteResult result
replaceDocumentsAwait | `suspend fun MongoClient.replaceDocumentsAwait(collection: String, query: JsonObject, replace: JsonObject): MongoClientUpdateResult` Replace matching documents in the specified collection and return the handler with MongoClientUpdateResult result
replaceDocumentsWithOptionsAwait | `suspend fun MongoClient.replaceDocumentsWithOptionsAwait(collection: String, query: JsonObject, replace: JsonObject, options: UpdateOptions): MongoClientUpdateResult` Replace matching documents in the specified collection, specifying options and return the handler with MongoClientUpdateResult result
runCommandAwait | `suspend fun MongoClient.runCommandAwait(commandName: String, command: JsonObject): JsonObject` Run an arbitrary MongoDB command.
saveAwait | `suspend fun MongoClient.saveAwait(collection: String, document: JsonObject): String` Save a document in the specified collection
saveWithOptionsAwait | `suspend fun MongoClient.saveWithOptionsAwait(collection: String, document: JsonObject, writeOption: WriteOption): String` Save a document in the specified collection with the specified write option
updateCollectionAwait | `suspend fun MongoClient.updateCollectionAwait(collection: String, query: JsonObject, update: JsonObject): MongoClientUpdateResult` Update matching documents in the specified collection and return the handler with MongoClientUpdateResult result
updateCollectionWithOptionsAwait | `suspend fun MongoClient.updateCollectionWithOptionsAwait(collection: String, query: JsonObject, update: JsonObject, options: UpdateOptions): MongoClientUpdateResult` Update matching documents in the specified collection, specifying options and return the handler with MongoClientUpdateResult result