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. |
|
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. |
|
suspend fun MongoClient.countAwait(collection: String, query: JsonObject): Long
Count matching documents in a collection. |
|
suspend fun MongoClient.createCollectionAwait(collectionName: String): Unit
Create a new collection |
|
suspend fun MongoClient.createIndexAwait(collection: String, key: JsonObject): Unit
Creates an index. |
|
suspend fun MongoClient.createIndexWithOptionsAwait(collection: String, key: JsonObject, options: IndexOptions): Unit
Creates an index. |
|
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) |
|
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) |
|
suspend fun MongoClient.dropCollectionAwait(collection: String): Unit
Drop a collection |
|
suspend fun MongoClient.dropIndexAwait(collection: String, indexName: String): Unit
Drops the index given its name. |
|
suspend fun MongoClient.findAwait(collection: String, query: JsonObject): List<JsonObject>
Find matching documents in the specified collection |
|
suspend fun MongoClient.findOneAndDeleteAwait(collection: String, query: JsonObject): JsonObject
Find a single matching document in the specified collection and delete it. |
|
suspend fun MongoClient.findOneAndDeleteWithOptionsAwait(collection: String, query: JsonObject, findOptions: FindOptions): JsonObject
Find a single matching document in the specified collection and delete it. |
|
suspend fun MongoClient.findOneAndReplaceAwait(collection: String, query: JsonObject, replace: JsonObject): JsonObject
Find a single matching document in the specified collection and replace it. |
|
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. |
|
suspend fun MongoClient.findOneAndUpdateAwait(collection: String, query: JsonObject, update: JsonObject): JsonObject
Find a single matching document in the specified collection and update it. |
|
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. |
|
suspend fun MongoClient.findOneAwait(collection: String, query: JsonObject, fields: JsonObject): JsonObject
Find a single matching document in the specified collection |
|
suspend fun MongoClient.findWithOptionsAwait(collection: String, query: JsonObject, options: FindOptions): List<JsonObject>
Find matching documents in the specified collection, specifying options |
|
suspend fun MongoClient.getCollectionsAwait(): List<String>
Get a list of all collections in the database. |
|
suspend fun MongoClient.insertAwait(collection: String, document: JsonObject): String
Insert a document in the specified collection |
|
suspend fun MongoClient.insertWithOptionsAwait(collection: String, document: JsonObject, writeOption: WriteOption): String
Insert a document in the specified collection with the specified write option |
|
suspend fun MongoClient.listIndexesAwait(collection: String): JsonArray
Get all the indexes in this collection. |
|
suspend fun MongoClient.removeDocumentAwait(collection: String, query: JsonObject): MongoClientDeleteResult
Remove a single matching document from a collection and return the handler with MongoClientDeleteResult result |
|
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 |
|
suspend fun MongoClient.removeDocumentsAwait(collection: String, query: JsonObject): MongoClientDeleteResult
Remove matching documents from a collection and return the handler with MongoClientDeleteResult result |
|
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 |
|
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 |
|
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 |
|
suspend fun MongoClient.runCommandAwait(commandName: String, command: JsonObject): JsonObject
Run an arbitrary MongoDB command. |
|
suspend fun MongoClient.saveAwait(collection: String, document: JsonObject): String
Save a document in the specified collection |
|
suspend fun MongoClient.saveWithOptionsAwait(collection: String, document: JsonObject, writeOption: WriteOption): String
Save a document in the specified collection with the specified write option |
|
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 |
|
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 |