Class MongoClient
- All Implemented Interfaces:
MutinyDelegate
Some of the operations might change _id field of passed JsonObject document.
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- Author:
- Tim Fox
- See Also:
-
MongoClient
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TypeArg<MongoClient>static final StringThe name of the default databasestatic final StringThe name of the default pool -
Constructor Summary
ConstructorsConstructorDescriptionMongoClient(io.vertx.ext.mongo.MongoClient delegate) Create a new instance ofMongoClientdelegating to the given (non-null) instance ofMongoClient.MongoClient(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionReadStream<io.vertx.core.json.JsonObject>Run aggregate MongoDB command with defaultAggregateOptions.ReadStream<io.vertx.core.json.JsonObject>aggregateWithOptions(String collection, io.vertx.core.json.JsonArray pipeline, io.vertx.ext.mongo.AggregateOptions options) Run aggregate MongoDB command.io.smallrye.mutiny.Uni<io.vertx.ext.mongo.MongoClientBulkWriteResult>Execute a bulk operation.io.vertx.ext.mongo.MongoClientBulkWriteResultbulkWriteAndAwait(String collection, List<io.vertx.ext.mongo.BulkOperation> operations) Execute a bulk operation.bulkWriteAndForget(String collection, List<io.vertx.ext.mongo.BulkOperation> operations) Execute a bulk operation.io.smallrye.mutiny.Uni<io.vertx.ext.mongo.MongoClientBulkWriteResult>bulkWriteWithOptions(String collection, List<io.vertx.ext.mongo.BulkOperation> operations, io.vertx.ext.mongo.BulkWriteOptions bulkWriteOptions) Execute a bulk operation with the specified write options.io.vertx.ext.mongo.MongoClientBulkWriteResultbulkWriteWithOptionsAndAwait(String collection, List<io.vertx.ext.mongo.BulkOperation> operations, io.vertx.ext.mongo.BulkWriteOptions bulkWriteOptions) Execute a bulk operation with the specified write options.bulkWriteWithOptionsAndForget(String collection, List<io.vertx.ext.mongo.BulkOperation> operations, io.vertx.ext.mongo.BulkWriteOptions bulkWriteOptions) Execute a bulk operation with the specified write options.io.smallrye.mutiny.Uni<Void>close()Close the client and release its resourcesvoidClose the client and release its resourcesClose the client and release its resourcesio.smallrye.mutiny.Uni<Long>Count matching documents in a collection.countAndAwait(String collection, io.vertx.core.json.JsonObject query) Count matching documents in a collection.countAndForget(String collection, io.vertx.core.json.JsonObject query) Count matching documents in a collection.io.smallrye.mutiny.Uni<Long>countWithOptions(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.CountOptions countOptions) Count matching documents in a collection.countWithOptionsAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.CountOptions countOptions) Count matching documents in a collection.countWithOptionsAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.CountOptions countOptions) Count matching documents in a collection.static MongoClientCreate a Mongo client which maintains its own data source.io.smallrye.mutiny.Uni<Void>createCollection(String collectionName) Create a new collectionvoidcreateCollectionAndAwait(String collectionName) Create a new collectioncreateCollectionAndForget(String collectionName) Create a new collectionio.smallrye.mutiny.Uni<Void>createCollectionWithOptions(String collectionName, io.vertx.ext.mongo.CreateCollectionOptions collectionOptions) Create a new collection with optionsvoidcreateCollectionWithOptionsAndAwait(String collectionName, io.vertx.ext.mongo.CreateCollectionOptions collectionOptions) Create a new collection with optionscreateCollectionWithOptionsAndForget(String collectionName, io.vertx.ext.mongo.CreateCollectionOptions collectionOptions) Create a new collection with optionsio.smallrye.mutiny.Uni<MongoGridFsClient>Creates aMongoGridFsClientused to interact with Mongo GridFS.Creates aMongoGridFsClientused to interact with Mongo GridFS.Creates aMongoGridFsClientused to interact with Mongo GridFS.io.smallrye.mutiny.Uni<MongoGridFsClient>createGridFsBucketService(String bucketName) Creates aMongoGridFsClientused to interact with Mongo GridFS.createGridFsBucketServiceAndAwait(String bucketName) Creates aMongoGridFsClientused to interact with Mongo GridFS.createGridFsBucketServiceAndForget(String bucketName) Creates aMongoGridFsClientused to interact with Mongo GridFS.io.smallrye.mutiny.Uni<Void>createIndex(String collection, io.vertx.core.json.JsonObject key) Creates an index.voidcreateIndexAndAwait(String collection, io.vertx.core.json.JsonObject key) Creates an index.createIndexAndForget(String collection, io.vertx.core.json.JsonObject key) Creates an index.io.smallrye.mutiny.Uni<Void>createIndexes(String collection, List<io.vertx.ext.mongo.IndexModel> indexes) creates an indexesvoidcreateIndexesAndAwait(String collection, List<io.vertx.ext.mongo.IndexModel> indexes) creates an indexescreateIndexesAndForget(String collection, List<io.vertx.ext.mongo.IndexModel> indexes) creates an indexesio.smallrye.mutiny.Uni<Void>createIndexWithOptions(String collection, io.vertx.core.json.JsonObject key, io.vertx.ext.mongo.IndexOptions options) Creates an index.voidcreateIndexWithOptionsAndAwait(String collection, io.vertx.core.json.JsonObject key, io.vertx.ext.mongo.IndexOptions options) Creates an index.createIndexWithOptionsAndForget(String collection, io.vertx.core.json.JsonObject key, io.vertx.ext.mongo.IndexOptions options) Creates an index.static MongoClientcreateShared(Vertx vertx, io.vertx.core.json.JsonObject config) LikecreateShared(io.vertx.mutiny.core.Vertx, JsonObject, String)but with the default data source namestatic MongoClientcreateShared(Vertx vertx, io.vertx.core.json.JsonObject config, String dataSourceName) Create a Mongo client which shares its data source with any other Mongo clients created with the same data source nameio.smallrye.mutiny.Uni<io.vertx.core.json.JsonArray>Gets the distinct values of the specified field name.io.smallrye.mutiny.Uni<io.vertx.core.json.JsonArray>distinct(String collection, String fieldName, String resultClassname, io.vertx.ext.mongo.DistinctOptions distinctOptions) Gets the distinct values of the specified field name.io.vertx.core.json.JsonArraydistinctAndAwait(String collection, String fieldName, String resultClassname) Gets the distinct values of the specified field name.io.vertx.core.json.JsonArraydistinctAndAwait(String collection, String fieldName, String resultClassname, io.vertx.ext.mongo.DistinctOptions distinctOptions) Gets the distinct values of the specified field name.distinctAndForget(String collection, String fieldName, String resultClassname) Gets the distinct values of the specified field name.distinctAndForget(String collection, String fieldName, String resultClassname, io.vertx.ext.mongo.DistinctOptions distinctOptions) Gets the distinct values of the specified field name.ReadStream<io.vertx.core.json.JsonObject>distinctBatch(String collection, String fieldName, String resultClassname) Gets the distinct values of the specified field name.ReadStream<io.vertx.core.json.JsonObject>distinctBatch(String collection, String fieldName, String resultClassname, io.vertx.ext.mongo.DistinctOptions distinctOptions) Gets the distinct values of the specified field name.ReadStream<io.vertx.core.json.JsonObject>distinctBatchWithQuery(String collection, String fieldName, String resultClassname, io.vertx.core.json.JsonObject query) Gets the distinct values of the specified field name filtered by specified query.ReadStream<io.vertx.core.json.JsonObject>distinctBatchWithQuery(String collection, String fieldName, String resultClassname, io.vertx.core.json.JsonObject query, int batchSize) Gets the distinct values of the specified field name filtered by specified query.ReadStream<io.vertx.core.json.JsonObject>distinctBatchWithQuery(String collection, String fieldName, String resultClassname, io.vertx.core.json.JsonObject query, int batchSize, io.vertx.ext.mongo.DistinctOptions distinctOptions) Gets the distinct values of the specified field name filtered by specified query.ReadStream<io.vertx.core.json.JsonObject>distinctBatchWithQuery(String collection, String fieldName, String resultClassname, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.DistinctOptions distinctOptions) Gets the distinct values of the specified field name filtered by specified query.io.smallrye.mutiny.Uni<io.vertx.core.json.JsonArray>distinctWithQuery(String collection, String fieldName, String resultClassname, io.vertx.core.json.JsonObject query) Gets the distinct values of the specified field name filtered by specified query.io.smallrye.mutiny.Uni<io.vertx.core.json.JsonArray>distinctWithQuery(String collection, String fieldName, String resultClassname, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.DistinctOptions distinctOptions) Gets the distinct values of the specified field name filtered by specified query.io.vertx.core.json.JsonArraydistinctWithQueryAndAwait(String collection, String fieldName, String resultClassname, io.vertx.core.json.JsonObject query) Gets the distinct values of the specified field name filtered by specified query.io.vertx.core.json.JsonArraydistinctWithQueryAndAwait(String collection, String fieldName, String resultClassname, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.DistinctOptions distinctOptions) Gets the distinct values of the specified field name filtered by specified query.distinctWithQueryAndForget(String collection, String fieldName, String resultClassname, io.vertx.core.json.JsonObject query) Gets the distinct values of the specified field name filtered by specified query.distinctWithQueryAndForget(String collection, String fieldName, String resultClassname, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.DistinctOptions distinctOptions) Gets the distinct values of the specified field name filtered by specified query.io.smallrye.mutiny.Uni<Void>dropCollection(String collection) Drop a collectionvoiddropCollectionAndAwait(String collection) Drop a collectiondropCollectionAndForget(String collection) Drop a collectionio.smallrye.mutiny.Uni<Void>Drops the index given the keys used to create it.io.smallrye.mutiny.Uni<Void>Drops the index given its name.voiddropIndexAndAwait(String collection, io.vertx.core.json.JsonObject key) Drops the index given the keys used to create it.voiddropIndexAndAwait(String collection, String indexName) Drops the index given its name.dropIndexAndForget(String collection, io.vertx.core.json.JsonObject key) Drops the index given the keys used to create it.dropIndexAndForget(String collection, String indexName) Drops the index given its name.booleanio.smallrye.mutiny.Uni<List<io.vertx.core.json.JsonObject>>Find matching documents in the specified collectionList<io.vertx.core.json.JsonObject>findAndAwait(String collection, io.vertx.core.json.JsonObject query) Find matching documents in the specified collectionfindAndForget(String collection, io.vertx.core.json.JsonObject query) Find matching documents in the specified collectionReadStream<io.vertx.core.json.JsonObject>Find matching documents in the specified collection.ReadStream<io.vertx.core.json.JsonObject>findBatchWithOptions(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.FindOptions options) Find matching documents in the specified collection, specifying options.io.smallrye.mutiny.Uni<io.vertx.core.json.JsonObject>findOne(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject fields) Find a single matching document in the specified collectionio.vertx.core.json.JsonObjectfindOneAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject fields) Find a single matching document in the specified collectionio.smallrye.mutiny.Uni<io.vertx.core.json.JsonObject>findOneAndDelete(String collection, io.vertx.core.json.JsonObject query) Find a single matching document in the specified collection and delete it.io.vertx.core.json.JsonObjectfindOneAndDeleteAndAwait(String collection, io.vertx.core.json.JsonObject query) Find a single matching document in the specified collection and delete it.findOneAndDeleteAndForget(String collection, io.vertx.core.json.JsonObject query) Find a single matching document in the specified collection and delete it.io.smallrye.mutiny.Uni<io.vertx.core.json.JsonObject>findOneAndDeleteWithOptions(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.FindOptions findOptions) Find a single matching document in the specified collection and delete it.io.vertx.core.json.JsonObjectfindOneAndDeleteWithOptionsAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.FindOptions findOptions) Find a single matching document in the specified collection and delete it.findOneAndDeleteWithOptionsAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.FindOptions findOptions) Find a single matching document in the specified collection and delete it.findOneAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject fields) Find a single matching document in the specified collectionio.smallrye.mutiny.Uni<io.vertx.core.json.JsonObject>findOneAndReplace(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject replace) Find a single matching document in the specified collection and replace it.io.vertx.core.json.JsonObjectfindOneAndReplaceAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject replace) Find a single matching document in the specified collection and replace it.findOneAndReplaceAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject replace) Find a single matching document in the specified collection and replace it.io.smallrye.mutiny.Uni<io.vertx.core.json.JsonObject>findOneAndReplaceWithOptions(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject replace, io.vertx.ext.mongo.FindOptions findOptions, io.vertx.ext.mongo.UpdateOptions updateOptions) Find a single matching document in the specified collection and replace it.io.vertx.core.json.JsonObjectfindOneAndReplaceWithOptionsAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject replace, io.vertx.ext.mongo.FindOptions findOptions, io.vertx.ext.mongo.UpdateOptions updateOptions) Find a single matching document in the specified collection and replace it.findOneAndReplaceWithOptionsAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject replace, io.vertx.ext.mongo.FindOptions findOptions, io.vertx.ext.mongo.UpdateOptions updateOptions) Find a single matching document in the specified collection and replace it.io.smallrye.mutiny.Uni<io.vertx.core.json.JsonObject>findOneAndUpdate(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject update) Find a single matching document in the specified collection and update it.io.vertx.core.json.JsonObjectfindOneAndUpdateAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject update) Find a single matching document in the specified collection and update it.findOneAndUpdateAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject update) Find a single matching document in the specified collection and update it.io.smallrye.mutiny.Uni<io.vertx.core.json.JsonObject>findOneAndUpdateWithOptions(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject update, io.vertx.ext.mongo.FindOptions findOptions, io.vertx.ext.mongo.UpdateOptions updateOptions) Find a single matching document in the specified collection and update it.io.vertx.core.json.JsonObjectfindOneAndUpdateWithOptionsAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject update, io.vertx.ext.mongo.FindOptions findOptions, io.vertx.ext.mongo.UpdateOptions updateOptions) Find a single matching document in the specified collection and update it.findOneAndUpdateWithOptionsAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject update, io.vertx.ext.mongo.FindOptions findOptions, io.vertx.ext.mongo.UpdateOptions updateOptions) Find a single matching document in the specified collection and update it.io.smallrye.mutiny.Uni<List<io.vertx.core.json.JsonObject>>findWithOptions(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.FindOptions options) Find matching documents in the specified collection, specifying optionsList<io.vertx.core.json.JsonObject>findWithOptionsAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.FindOptions options) Find matching documents in the specified collection, specifying optionsfindWithOptionsAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.FindOptions options) Find matching documents in the specified collection, specifying optionsGet a list of all collections in the database.Get a list of all collections in the database.Get a list of all collections in the database.io.vertx.ext.mongo.MongoClientGet the delegate instance.inthashCode()io.smallrye.mutiny.Uni<String>Insert a document in the specified collectioninsertAndAwait(String collection, io.vertx.core.json.JsonObject document) Insert a document in the specified collectioninsertAndForget(String collection, io.vertx.core.json.JsonObject document) Insert a document in the specified collectionio.smallrye.mutiny.Uni<String>insertWithOptions(String collection, io.vertx.core.json.JsonObject document, io.vertx.ext.mongo.WriteOption writeOption) Insert a document in the specified collection with the specified write optioninsertWithOptionsAndAwait(String collection, io.vertx.core.json.JsonObject document, io.vertx.ext.mongo.WriteOption writeOption) Insert a document in the specified collection with the specified write optioninsertWithOptionsAndForget(String collection, io.vertx.core.json.JsonObject document, io.vertx.ext.mongo.WriteOption writeOption) Insert a document in the specified collection with the specified write optionio.smallrye.mutiny.Uni<io.vertx.core.json.JsonArray>listIndexes(String collection) Get all the indexes in this collection.io.vertx.core.json.JsonArraylistIndexesAndAwait(String collection) Get all the indexes in this collection.listIndexesAndForget(String collection) Get all the indexes in this collection.static MongoClientnewInstance(io.vertx.ext.mongo.MongoClient delegate) Creates a new instance of theMongoClient.io.smallrye.mutiny.Uni<io.vertx.ext.mongo.MongoClientDeleteResult>removeDocument(String collection, io.vertx.core.json.JsonObject query) Remove a single matching document from a collection and return the handler withMongoClientDeleteResultresultio.vertx.ext.mongo.MongoClientDeleteResultremoveDocumentAndAwait(String collection, io.vertx.core.json.JsonObject query) Remove a single matching document from a collection and return the handler withMongoClientDeleteResultresultremoveDocumentAndForget(String collection, io.vertx.core.json.JsonObject query) Remove a single matching document from a collection and return the handler withMongoClientDeleteResultresultio.smallrye.mutiny.Uni<io.vertx.ext.mongo.MongoClientDeleteResult>removeDocuments(String collection, io.vertx.core.json.JsonObject query) Remove matching documents from a collection and return the handler withMongoClientDeleteResultresultio.vertx.ext.mongo.MongoClientDeleteResultremoveDocumentsAndAwait(String collection, io.vertx.core.json.JsonObject query) Remove matching documents from a collection and return the handler withMongoClientDeleteResultresultremoveDocumentsAndForget(String collection, io.vertx.core.json.JsonObject query) Remove matching documents from a collection and return the handler withMongoClientDeleteResultresultio.smallrye.mutiny.Uni<io.vertx.ext.mongo.MongoClientDeleteResult>removeDocumentsWithOptions(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.WriteOption writeOption) Remove matching documents from a collection with the specified write option and return the handler withMongoClientDeleteResultresultio.vertx.ext.mongo.MongoClientDeleteResultremoveDocumentsWithOptionsAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.WriteOption writeOption) Remove matching documents from a collection with the specified write option and return the handler withMongoClientDeleteResultresultremoveDocumentsWithOptionsAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.WriteOption writeOption) Remove matching documents from a collection with the specified write option and return the handler withMongoClientDeleteResultresultio.smallrye.mutiny.Uni<io.vertx.ext.mongo.MongoClientDeleteResult>removeDocumentWithOptions(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.WriteOption writeOption) Remove a single matching document from a collection with the specified write option and return the handler withMongoClientDeleteResultresultio.vertx.ext.mongo.MongoClientDeleteResultremoveDocumentWithOptionsAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.WriteOption writeOption) Remove a single matching document from a collection with the specified write option and return the handler withMongoClientDeleteResultresultremoveDocumentWithOptionsAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.WriteOption writeOption) Remove a single matching document from a collection with the specified write option and return the handler withMongoClientDeleteResultresultio.smallrye.mutiny.Uni<Void>renameCollection(String oldCollectionName, String newCollectionName) Rename a collectionvoidrenameCollectionAndAwait(String oldCollectionName, String newCollectionName) Rename a collectionrenameCollectionAndForget(String oldCollectionName, String newCollectionName) Rename a collectionio.smallrye.mutiny.Uni<Void>renameCollectionWithOptions(String oldCollectionName, String newCollectionName, io.vertx.ext.mongo.RenameCollectionOptions collectionOptions) Rename a collectionvoidrenameCollectionWithOptionsAndAwait(String oldCollectionName, String newCollectionName, io.vertx.ext.mongo.RenameCollectionOptions collectionOptions) Rename a collectionrenameCollectionWithOptionsAndForget(String oldCollectionName, String newCollectionName, io.vertx.ext.mongo.RenameCollectionOptions collectionOptions) Rename a collectionio.smallrye.mutiny.Uni<io.vertx.ext.mongo.MongoClientUpdateResult>replaceDocuments(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject replace) Replace matching documents in the specified collection and return the handler withMongoClientUpdateResultresultio.vertx.ext.mongo.MongoClientUpdateResultreplaceDocumentsAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject replace) Replace matching documents in the specified collection and return the handler withMongoClientUpdateResultresultreplaceDocumentsAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject replace) Replace matching documents in the specified collection and return the handler withMongoClientUpdateResultresultio.smallrye.mutiny.Uni<io.vertx.ext.mongo.MongoClientUpdateResult>replaceDocumentsWithOptions(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject replace, io.vertx.ext.mongo.UpdateOptions options) Replace matching documents in the specified collection, specifying options and return the handler withMongoClientUpdateResultresultio.vertx.ext.mongo.MongoClientUpdateResultreplaceDocumentsWithOptionsAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject replace, io.vertx.ext.mongo.UpdateOptions options) Replace matching documents in the specified collection, specifying options and return the handler withMongoClientUpdateResultresultreplaceDocumentsWithOptionsAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject replace, io.vertx.ext.mongo.UpdateOptions options) Replace matching documents in the specified collection, specifying options and return the handler withMongoClientUpdateResultresultio.smallrye.mutiny.Uni<io.vertx.core.json.JsonObject>runCommand(String commandName, io.vertx.core.json.JsonObject command) Run an arbitrary MongoDB command.io.vertx.core.json.JsonObjectrunCommandAndAwait(String commandName, io.vertx.core.json.JsonObject command) Run an arbitrary MongoDB command.runCommandAndForget(String commandName, io.vertx.core.json.JsonObject command) Run an arbitrary MongoDB command.io.smallrye.mutiny.Uni<String>Save a document in the specified collectionsaveAndAwait(String collection, io.vertx.core.json.JsonObject document) Save a document in the specified collectionsaveAndForget(String collection, io.vertx.core.json.JsonObject document) Save a document in the specified collectionio.smallrye.mutiny.Uni<String>saveWithOptions(String collection, io.vertx.core.json.JsonObject document, io.vertx.ext.mongo.WriteOption writeOption) Save a document in the specified collection with the specified write optionsaveWithOptionsAndAwait(String collection, io.vertx.core.json.JsonObject document, io.vertx.ext.mongo.WriteOption writeOption) Save a document in the specified collection with the specified write optionsaveWithOptionsAndForget(String collection, io.vertx.core.json.JsonObject document, io.vertx.ext.mongo.WriteOption writeOption) Save a document in the specified collection with the specified write optiontoString()io.smallrye.mutiny.Uni<io.vertx.ext.mongo.MongoClientUpdateResult>updateCollection(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonArray update) Use an aggregation pipeline to update documents in the specified collection and return the handler withMongoClientUpdateResultresultio.smallrye.mutiny.Uni<io.vertx.ext.mongo.MongoClientUpdateResult>updateCollection(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject update) Update matching documents in the specified collection and return the handler withMongoClientUpdateResultresultio.vertx.ext.mongo.MongoClientUpdateResultupdateCollectionAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonArray update) Use an aggregation pipeline to update documents in the specified collection and return the handler withMongoClientUpdateResultresultio.vertx.ext.mongo.MongoClientUpdateResultupdateCollectionAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject update) Update matching documents in the specified collection and return the handler withMongoClientUpdateResultresultupdateCollectionAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonArray update) Use an aggregation pipeline to update documents in the specified collection and return the handler withMongoClientUpdateResultresultupdateCollectionAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject update) Update matching documents in the specified collection and return the handler withMongoClientUpdateResultresultio.smallrye.mutiny.Uni<io.vertx.ext.mongo.MongoClientUpdateResult>updateCollectionWithOptions(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonArray update, io.vertx.ext.mongo.UpdateOptions options) Use an aggregation pipeline to update documents in the specified collection, specifying options and return the handler withMongoClientUpdateResultresultio.smallrye.mutiny.Uni<io.vertx.ext.mongo.MongoClientUpdateResult>updateCollectionWithOptions(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject update, io.vertx.ext.mongo.UpdateOptions options) Update matching documents in the specified collection, specifying options and return the handler withMongoClientUpdateResultresultio.vertx.ext.mongo.MongoClientUpdateResultupdateCollectionWithOptionsAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonArray update, io.vertx.ext.mongo.UpdateOptions options) Use an aggregation pipeline to update documents in the specified collection, specifying options and return the handler withMongoClientUpdateResultresultio.vertx.ext.mongo.MongoClientUpdateResultupdateCollectionWithOptionsAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject update, io.vertx.ext.mongo.UpdateOptions options) Update matching documents in the specified collection, specifying options and return the handler withMongoClientUpdateResultresultupdateCollectionWithOptionsAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonArray update, io.vertx.ext.mongo.UpdateOptions options) Use an aggregation pipeline to update documents in the specified collection, specifying options and return the handler withMongoClientUpdateResultresultupdateCollectionWithOptionsAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject update, io.vertx.ext.mongo.UpdateOptions options) Update matching documents in the specified collection, specifying options and return the handler withMongoClientUpdateResultresultReadStream<com.mongodb.client.model.changestream.ChangeStreamDocument<io.vertx.core.json.JsonObject>>watch(String collection, io.vertx.core.json.JsonArray pipeline, boolean withUpdatedDoc, int batchSize) Watch the collection change.
-
Field Details
-
DEFAULT_POOL_NAME
The name of the default pool- See Also:
-
DEFAULT_DB_NAME
The name of the default database- See Also:
-
__TYPE_ARG
-
-
Constructor Details
-
MongoClient
public MongoClient(io.vertx.ext.mongo.MongoClient delegate) Create a new instance ofMongoClientdelegating to the given (non-null) instance ofMongoClient. -
MongoClient
-
-
Method Details
-
getDelegate
public io.vertx.ext.mongo.MongoClient getDelegate()Get the delegate instance.This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.
- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate instance
-
save
@CheckReturnValue public io.smallrye.mutiny.Uni<String> save(String collection, io.vertx.core.json.JsonObject document) Save a document in the specified collectionThis operation might change _id field of document parameter
Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectiondocument- the document- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.save(String, JsonObject)
-
saveAndAwait
Save a document in the specified collectionThis operation might change _id field of document parameter
Unlike the bare Vert.x variant, this method returns a
String. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectiondocument- the document- Returns:
- The operation result
- See Also:
-
MongoClient.save(String, JsonObject)
-
saveAndForget
Save a document in the specified collectionThis operation might change _id field of document parameter
Unlike the bare Vert.x variant, this method ignores the
Stringresult or any failure.- Parameters:
collection- the collectiondocument- the document- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.save(String, JsonObject)
-
saveWithOptions
@CheckReturnValue public io.smallrye.mutiny.Uni<String> saveWithOptions(String collection, io.vertx.core.json.JsonObject document, io.vertx.ext.mongo.WriteOption writeOption) Save a document in the specified collection with the specified write optionThis operation might change _id field of document parameter
Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectiondocument- the documentwriteOption- the write option to use. Can benull.- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.saveWithOptions(String, JsonObject, WriteOption)
-
saveWithOptionsAndAwait
public String saveWithOptionsAndAwait(String collection, io.vertx.core.json.JsonObject document, io.vertx.ext.mongo.WriteOption writeOption) Save a document in the specified collection with the specified write optionThis operation might change _id field of document parameter
Unlike the bare Vert.x variant, this method returns a
String. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectiondocument- the documentwriteOption- the write option to use- Returns:
- The operation result
- See Also:
-
MongoClient.saveWithOptions(String, JsonObject, WriteOption)
-
saveWithOptionsAndForget
public MongoClient saveWithOptionsAndForget(String collection, io.vertx.core.json.JsonObject document, io.vertx.ext.mongo.WriteOption writeOption) Save a document in the specified collection with the specified write optionThis operation might change _id field of document parameter
Unlike the bare Vert.x variant, this method ignores the
Stringresult or any failure.- Parameters:
collection- the collectiondocument- the documentwriteOption- the write option to use- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.saveWithOptions(String, JsonObject, WriteOption)
-
insert
@CheckReturnValue public io.smallrye.mutiny.Uni<String> insert(String collection, io.vertx.core.json.JsonObject document) Insert a document in the specified collectionThis operation might change _id field of document parameter
Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectiondocument- the document- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.insert(String, JsonObject)
-
insertAndAwait
Insert a document in the specified collectionThis operation might change _id field of document parameter
Unlike the bare Vert.x variant, this method returns a
String. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectiondocument- the document- Returns:
- The operation result
- See Also:
-
MongoClient.insert(String, JsonObject)
-
insertAndForget
Insert a document in the specified collectionThis operation might change _id field of document parameter
Unlike the bare Vert.x variant, this method ignores the
Stringresult or any failure.- Parameters:
collection- the collectiondocument- the document- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.insert(String, JsonObject)
-
insertWithOptions
@CheckReturnValue public io.smallrye.mutiny.Uni<String> insertWithOptions(String collection, io.vertx.core.json.JsonObject document, io.vertx.ext.mongo.WriteOption writeOption) Insert a document in the specified collection with the specified write optionThis operation might change _id field of document parameter
Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectiondocument- the documentwriteOption- the write option to use. Can benull.- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.insertWithOptions(String, JsonObject, WriteOption)
-
insertWithOptionsAndAwait
public String insertWithOptionsAndAwait(String collection, io.vertx.core.json.JsonObject document, io.vertx.ext.mongo.WriteOption writeOption) Insert a document in the specified collection with the specified write optionThis operation might change _id field of document parameter
Unlike the bare Vert.x variant, this method returns a
String. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectiondocument- the documentwriteOption- the write option to use- Returns:
- The operation result
- See Also:
-
MongoClient.insertWithOptions(String, JsonObject, WriteOption)
-
insertWithOptionsAndForget
public MongoClient insertWithOptionsAndForget(String collection, io.vertx.core.json.JsonObject document, io.vertx.ext.mongo.WriteOption writeOption) Insert a document in the specified collection with the specified write optionThis operation might change _id field of document parameter
Unlike the bare Vert.x variant, this method ignores the
Stringresult or any failure.- Parameters:
collection- the collectiondocument- the documentwriteOption- the write option to use- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.insertWithOptions(String, JsonObject, WriteOption)
-
updateCollection
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.mongo.MongoClientUpdateResult> updateCollection(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject update) Update matching documents in the specified collection and return the handler withMongoClientUpdateResultresultUnlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionquery- query used to match the documentsupdate- used to describe how the documents will be updated- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.updateCollection(String, JsonObject, JsonObject)
-
updateCollectionAndAwait
public io.vertx.ext.mongo.MongoClientUpdateResult updateCollectionAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject update) Update matching documents in the specified collection and return the handler withMongoClientUpdateResultresultUnlike the bare Vert.x variant, this method returns a
MongoClientUpdateResult. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionquery- query used to match the documentsupdate- used to describe how the documents will be updated- Returns:
- The operation result
- See Also:
-
MongoClient.updateCollection(String, JsonObject, JsonObject)
-
updateCollectionAndForget
public MongoClient updateCollectionAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject update) Update matching documents in the specified collection and return the handler withMongoClientUpdateResultresultUnlike the bare Vert.x variant, this method ignores the
MongoClientUpdateResultresult or any failure.- Parameters:
collection- the collectionquery- query used to match the documentsupdate- used to describe how the documents will be updated- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.updateCollection(String, JsonObject, JsonObject)
-
updateCollection
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.mongo.MongoClientUpdateResult> updateCollection(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonArray update) Use an aggregation pipeline to update documents in the specified collection and return the handler withMongoClientUpdateResultresultUnlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionquery- query used to match the documentsupdate- used to describe how the documents will be updated- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.updateCollection(String, JsonObject, JsonArray)
-
updateCollectionAndAwait
public io.vertx.ext.mongo.MongoClientUpdateResult updateCollectionAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonArray update) Use an aggregation pipeline to update documents in the specified collection and return the handler withMongoClientUpdateResultresultUnlike the bare Vert.x variant, this method returns a
MongoClientUpdateResult. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionquery- query used to match the documentsupdate- used to describe how the documents will be updated- Returns:
- The operation result
- See Also:
-
MongoClient.updateCollection(String, JsonObject, JsonArray)
-
updateCollectionAndForget
public MongoClient updateCollectionAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonArray update) Use an aggregation pipeline to update documents in the specified collection and return the handler withMongoClientUpdateResultresultUnlike the bare Vert.x variant, this method ignores the
MongoClientUpdateResultresult or any failure.- Parameters:
collection- the collectionquery- query used to match the documentsupdate- used to describe how the documents will be updated- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.updateCollection(String, JsonObject, JsonArray)
-
updateCollectionWithOptions
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.mongo.MongoClientUpdateResult> updateCollectionWithOptions(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject update, io.vertx.ext.mongo.UpdateOptions options) Update matching documents in the specified collection, specifying options and return the handler withMongoClientUpdateResultresultUnlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionquery- query used to match the documentsupdate- used to describe how the documents will be updatedoptions- options to configure the update- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.updateCollectionWithOptions(String, JsonObject, JsonObject, UpdateOptions)
-
updateCollectionWithOptionsAndAwait
public io.vertx.ext.mongo.MongoClientUpdateResult updateCollectionWithOptionsAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject update, io.vertx.ext.mongo.UpdateOptions options) Update matching documents in the specified collection, specifying options and return the handler withMongoClientUpdateResultresultUnlike the bare Vert.x variant, this method returns a
MongoClientUpdateResult. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionquery- query used to match the documentsupdate- used to describe how the documents will be updatedoptions- options to configure the update- Returns:
- The operation result
- See Also:
-
MongoClient.updateCollectionWithOptions(String, JsonObject, JsonObject, UpdateOptions)
-
updateCollectionWithOptionsAndForget
public MongoClient updateCollectionWithOptionsAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject update, io.vertx.ext.mongo.UpdateOptions options) Update matching documents in the specified collection, specifying options and return the handler withMongoClientUpdateResultresultUnlike the bare Vert.x variant, this method ignores the
MongoClientUpdateResultresult or any failure.- Parameters:
collection- the collectionquery- query used to match the documentsupdate- used to describe how the documents will be updatedoptions- options to configure the update- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.updateCollectionWithOptions(String, JsonObject, JsonObject, UpdateOptions)
-
updateCollectionWithOptions
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.mongo.MongoClientUpdateResult> updateCollectionWithOptions(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonArray update, io.vertx.ext.mongo.UpdateOptions options) Use an aggregation pipeline to update documents in the specified collection, specifying options and return the handler withMongoClientUpdateResultresultUnlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionquery- query used to match the documentsupdate- aggregation pipeline used to describe how documents will be updatedoptions- options to configure the update- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.updateCollectionWithOptions(String, JsonObject, JsonArray, UpdateOptions)
-
updateCollectionWithOptionsAndAwait
public io.vertx.ext.mongo.MongoClientUpdateResult updateCollectionWithOptionsAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonArray update, io.vertx.ext.mongo.UpdateOptions options) Use an aggregation pipeline to update documents in the specified collection, specifying options and return the handler withMongoClientUpdateResultresultUnlike the bare Vert.x variant, this method returns a
MongoClientUpdateResult. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionquery- query used to match the documentsupdate- aggregation pipeline used to describe how documents will be updatedoptions- options to configure the update- Returns:
- The operation result
- See Also:
-
MongoClient.updateCollectionWithOptions(String, JsonObject, JsonArray, UpdateOptions)
-
updateCollectionWithOptionsAndForget
public MongoClient updateCollectionWithOptionsAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonArray update, io.vertx.ext.mongo.UpdateOptions options) Use an aggregation pipeline to update documents in the specified collection, specifying options and return the handler withMongoClientUpdateResultresultUnlike the bare Vert.x variant, this method ignores the
MongoClientUpdateResultresult or any failure.- Parameters:
collection- the collectionquery- query used to match the documentsupdate- aggregation pipeline used to describe how documents will be updatedoptions- options to configure the update- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.updateCollectionWithOptions(String, JsonObject, JsonArray, UpdateOptions)
-
replaceDocuments
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.mongo.MongoClientUpdateResult> replaceDocuments(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject replace) Replace matching documents in the specified collection and return the handler withMongoClientUpdateResultresultUnlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionquery- query used to match the documentsreplace- all matching documents will be replaced with this- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.replaceDocuments(String, JsonObject, JsonObject)
-
replaceDocumentsAndAwait
public io.vertx.ext.mongo.MongoClientUpdateResult replaceDocumentsAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject replace) Replace matching documents in the specified collection and return the handler withMongoClientUpdateResultresultUnlike the bare Vert.x variant, this method returns a
MongoClientUpdateResult. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionquery- query used to match the documentsreplace- all matching documents will be replaced with this- Returns:
- The operation result
- See Also:
-
MongoClient.replaceDocuments(String, JsonObject, JsonObject)
-
replaceDocumentsAndForget
public MongoClient replaceDocumentsAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject replace) Replace matching documents in the specified collection and return the handler withMongoClientUpdateResultresultUnlike the bare Vert.x variant, this method ignores the
MongoClientUpdateResultresult or any failure.- Parameters:
collection- the collectionquery- query used to match the documentsreplace- all matching documents will be replaced with this- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.replaceDocuments(String, JsonObject, JsonObject)
-
replaceDocumentsWithOptions
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.mongo.MongoClientUpdateResult> replaceDocumentsWithOptions(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject replace, io.vertx.ext.mongo.UpdateOptions options) Replace matching documents in the specified collection, specifying options and return the handler withMongoClientUpdateResultresultUnlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionquery- query used to match the documentsreplace- all matching documents will be replaced with thisoptions- options to configure the replace- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.replaceDocumentsWithOptions(String, JsonObject, JsonObject, UpdateOptions)
-
replaceDocumentsWithOptionsAndAwait
public io.vertx.ext.mongo.MongoClientUpdateResult replaceDocumentsWithOptionsAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject replace, io.vertx.ext.mongo.UpdateOptions options) Replace matching documents in the specified collection, specifying options and return the handler withMongoClientUpdateResultresultUnlike the bare Vert.x variant, this method returns a
MongoClientUpdateResult. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionquery- query used to match the documentsreplace- all matching documents will be replaced with thisoptions- options to configure the replace- Returns:
- The operation result
- See Also:
-
MongoClient.replaceDocumentsWithOptions(String, JsonObject, JsonObject, UpdateOptions)
-
replaceDocumentsWithOptionsAndForget
public MongoClient replaceDocumentsWithOptionsAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject replace, io.vertx.ext.mongo.UpdateOptions options) Replace matching documents in the specified collection, specifying options and return the handler withMongoClientUpdateResultresultUnlike the bare Vert.x variant, this method ignores the
MongoClientUpdateResultresult or any failure.- Parameters:
collection- the collectionquery- query used to match the documentsreplace- all matching documents will be replaced with thisoptions- options to configure the replace- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.replaceDocumentsWithOptions(String, JsonObject, JsonObject, UpdateOptions)
-
bulkWrite
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.mongo.MongoClientBulkWriteResult> bulkWrite(String collection, List<io.vertx.ext.mongo.BulkOperation> operations) Execute a bulk operation. Can insert, update, replace, and/or delete multiple documents with one request.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionoperations- the operations to execute- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.bulkWrite(String, List)
-
bulkWriteAndAwait
public io.vertx.ext.mongo.MongoClientBulkWriteResult bulkWriteAndAwait(String collection, List<io.vertx.ext.mongo.BulkOperation> operations) Execute a bulk operation. Can insert, update, replace, and/or delete multiple documents with one request.Unlike the bare Vert.x variant, this method returns a
MongoClientBulkWriteResult. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionoperations- the operations to execute- Returns:
- The operation result
- See Also:
-
MongoClient.bulkWrite(String, List)
-
bulkWriteAndForget
public MongoClient bulkWriteAndForget(String collection, List<io.vertx.ext.mongo.BulkOperation> operations) Execute a bulk operation. Can insert, update, replace, and/or delete multiple documents with one request.Unlike the bare Vert.x variant, this method ignores the
MongoClientBulkWriteResultresult or any failure.- Parameters:
collection- the collectionoperations- the operations to execute- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.bulkWrite(String, List)
-
bulkWriteWithOptions
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.mongo.MongoClientBulkWriteResult> bulkWriteWithOptions(String collection, List<io.vertx.ext.mongo.BulkOperation> operations, io.vertx.ext.mongo.BulkWriteOptions bulkWriteOptions) Execute a bulk operation with the specified write options. Can insert, update, replace, and/or delete multiple documents with one request.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionoperations- the operations to executebulkWriteOptions- the write options- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.bulkWriteWithOptions(String, List, BulkWriteOptions)
-
bulkWriteWithOptionsAndAwait
public io.vertx.ext.mongo.MongoClientBulkWriteResult bulkWriteWithOptionsAndAwait(String collection, List<io.vertx.ext.mongo.BulkOperation> operations, io.vertx.ext.mongo.BulkWriteOptions bulkWriteOptions) Execute a bulk operation with the specified write options. Can insert, update, replace, and/or delete multiple documents with one request.Unlike the bare Vert.x variant, this method returns a
MongoClientBulkWriteResult. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionoperations- the operations to executebulkWriteOptions- the write options- Returns:
- The operation result
- See Also:
-
MongoClient.bulkWriteWithOptions(String, List, BulkWriteOptions)
-
bulkWriteWithOptionsAndForget
public MongoClient bulkWriteWithOptionsAndForget(String collection, List<io.vertx.ext.mongo.BulkOperation> operations, io.vertx.ext.mongo.BulkWriteOptions bulkWriteOptions) Execute a bulk operation with the specified write options. Can insert, update, replace, and/or delete multiple documents with one request.Unlike the bare Vert.x variant, this method ignores the
MongoClientBulkWriteResultresult or any failure.- Parameters:
collection- the collectionoperations- the operations to executebulkWriteOptions- the write options- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.bulkWriteWithOptions(String, List, BulkWriteOptions)
-
find
@CheckReturnValue public io.smallrye.mutiny.Uni<List<io.vertx.core.json.JsonObject>> find(String collection, io.vertx.core.json.JsonObject query) Find matching documents in the specified collectionUnlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionquery- query used to match documents- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.find(String, JsonObject)
-
findAndAwait
public List<io.vertx.core.json.JsonObject> findAndAwait(String collection, io.vertx.core.json.JsonObject query) Find matching documents in the specified collectionUnlike the bare Vert.x variant, this method returns a
List<io.vertx.core.json.JsonObject>. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionquery- query used to match documents- Returns:
- The operation result
- See Also:
-
MongoClient.find(String, JsonObject)
-
findAndForget
Find matching documents in the specified collectionUnlike the bare Vert.x variant, this method ignores the
List<io.vertx.core.json.JsonObject>result or any failure.- Parameters:
collection- the collectionquery- query used to match documents- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.find(String, JsonObject)
-
findWithOptions
@CheckReturnValue public io.smallrye.mutiny.Uni<List<io.vertx.core.json.JsonObject>> findWithOptions(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.FindOptions options) Find matching documents in the specified collection, specifying optionsUnlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionquery- query used to match documentsoptions- options to configure the find- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.findWithOptions(String, JsonObject, FindOptions)
-
findWithOptionsAndAwait
public List<io.vertx.core.json.JsonObject> findWithOptionsAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.FindOptions options) Find matching documents in the specified collection, specifying optionsUnlike the bare Vert.x variant, this method returns a
List<io.vertx.core.json.JsonObject>. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionquery- query used to match documentsoptions- options to configure the find- Returns:
- The operation result
- See Also:
-
MongoClient.findWithOptions(String, JsonObject, FindOptions)
-
findWithOptionsAndForget
public MongoClient findWithOptionsAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.FindOptions options) Find matching documents in the specified collection, specifying optionsUnlike the bare Vert.x variant, this method ignores the
List<io.vertx.core.json.JsonObject>result or any failure.- Parameters:
collection- the collectionquery- query used to match documentsoptions- options to configure the find- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.findWithOptions(String, JsonObject, FindOptions)
-
findOne
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.core.json.JsonObject> findOne(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject fields) Find a single matching document in the specified collectionThis operation might change _id field of query parameter
Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionquery- the query used to match the documentfields- the fields. Can benull.- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.findOne(String, JsonObject, JsonObject)
-
findOneAndAwait
public io.vertx.core.json.JsonObject findOneAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject fields) Find a single matching document in the specified collectionThis operation might change _id field of query parameter
Unlike the bare Vert.x variant, this method returns a
JsonObject. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionquery- the query used to match the documentfields- the fields- Returns:
- The operation result
- See Also:
-
MongoClient.findOne(String, JsonObject, JsonObject)
-
findOneAndForget
public MongoClient findOneAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject fields) Find a single matching document in the specified collectionThis operation might change _id field of query parameter
Unlike the bare Vert.x variant, this method ignores the
JsonObjectresult or any failure.- Parameters:
collection- the collectionquery- the query used to match the documentfields- the fields- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.findOne(String, JsonObject, JsonObject)
-
findOneAndUpdate
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.core.json.JsonObject> findOneAndUpdate(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject update) Find a single matching document in the specified collection and update it.This operation might change _id field of query parameter
Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionquery- the query used to match the documentupdate- used to describe how the documents will be updated- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.findOneAndUpdate(String, JsonObject, JsonObject)
-
findOneAndUpdateAndAwait
public io.vertx.core.json.JsonObject findOneAndUpdateAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject update) Find a single matching document in the specified collection and update it.This operation might change _id field of query parameter
Unlike the bare Vert.x variant, this method returns a
JsonObject. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionquery- the query used to match the documentupdate- used to describe how the documents will be updated- Returns:
- The operation result
- See Also:
-
MongoClient.findOneAndUpdate(String, JsonObject, JsonObject)
-
findOneAndUpdateAndForget
public MongoClient findOneAndUpdateAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject update) Find a single matching document in the specified collection and update it.This operation might change _id field of query parameter
Unlike the bare Vert.x variant, this method ignores the
JsonObjectresult or any failure.- Parameters:
collection- the collectionquery- the query used to match the documentupdate- used to describe how the documents will be updated- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.findOneAndUpdate(String, JsonObject, JsonObject)
-
findOneAndUpdateWithOptions
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.core.json.JsonObject> findOneAndUpdateWithOptions(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject update, io.vertx.ext.mongo.FindOptions findOptions, io.vertx.ext.mongo.UpdateOptions updateOptions) Find a single matching document in the specified collection and update it.This operation might change _id field of query parameter
Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionquery- the query used to match the documentupdate- used to describe how the documents will be updatedfindOptions- options to configure the findupdateOptions- options to configure the update- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.findOneAndUpdateWithOptions(String, JsonObject, JsonObject, FindOptions, UpdateOptions)
-
findOneAndUpdateWithOptionsAndAwait
public io.vertx.core.json.JsonObject findOneAndUpdateWithOptionsAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject update, io.vertx.ext.mongo.FindOptions findOptions, io.vertx.ext.mongo.UpdateOptions updateOptions) Find a single matching document in the specified collection and update it.This operation might change _id field of query parameter
Unlike the bare Vert.x variant, this method returns a
JsonObject. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionquery- the query used to match the documentupdate- used to describe how the documents will be updatedfindOptions- options to configure the findupdateOptions- options to configure the update- Returns:
- The operation result
- See Also:
-
MongoClient.findOneAndUpdateWithOptions(String, JsonObject, JsonObject, FindOptions, UpdateOptions)
-
findOneAndUpdateWithOptionsAndForget
public MongoClient findOneAndUpdateWithOptionsAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject update, io.vertx.ext.mongo.FindOptions findOptions, io.vertx.ext.mongo.UpdateOptions updateOptions) Find a single matching document in the specified collection and update it.This operation might change _id field of query parameter
Unlike the bare Vert.x variant, this method ignores the
JsonObjectresult or any failure.- Parameters:
collection- the collectionquery- the query used to match the documentupdate- used to describe how the documents will be updatedfindOptions- options to configure the findupdateOptions- options to configure the update- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.findOneAndUpdateWithOptions(String, JsonObject, JsonObject, FindOptions, UpdateOptions)
-
findOneAndReplace
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.core.json.JsonObject> findOneAndReplace(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject replace) Find a single matching document in the specified collection and replace it.This operation might change _id field of query parameter
Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionquery- the query used to match the documentreplace- the replacement document- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.findOneAndReplace(String, JsonObject, JsonObject)
-
findOneAndReplaceAndAwait
public io.vertx.core.json.JsonObject findOneAndReplaceAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject replace) Find a single matching document in the specified collection and replace it.This operation might change _id field of query parameter
Unlike the bare Vert.x variant, this method returns a
JsonObject. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionquery- the query used to match the documentreplace- the replacement document- Returns:
- The operation result
- See Also:
-
MongoClient.findOneAndReplace(String, JsonObject, JsonObject)
-
findOneAndReplaceAndForget
public MongoClient findOneAndReplaceAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject replace) Find a single matching document in the specified collection and replace it.This operation might change _id field of query parameter
Unlike the bare Vert.x variant, this method ignores the
JsonObjectresult or any failure.- Parameters:
collection- the collectionquery- the query used to match the documentreplace- the replacement document- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.findOneAndReplace(String, JsonObject, JsonObject)
-
findOneAndReplaceWithOptions
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.core.json.JsonObject> findOneAndReplaceWithOptions(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject replace, io.vertx.ext.mongo.FindOptions findOptions, io.vertx.ext.mongo.UpdateOptions updateOptions) Find a single matching document in the specified collection and replace it.This operation might change _id field of query parameter
Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionquery- the query used to match the documentreplace- the replacement documentfindOptions- options to configure the findupdateOptions- options to configure the update- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.findOneAndReplaceWithOptions(String, JsonObject, JsonObject, FindOptions, UpdateOptions)
-
findOneAndReplaceWithOptionsAndAwait
public io.vertx.core.json.JsonObject findOneAndReplaceWithOptionsAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject replace, io.vertx.ext.mongo.FindOptions findOptions, io.vertx.ext.mongo.UpdateOptions updateOptions) Find a single matching document in the specified collection and replace it.This operation might change _id field of query parameter
Unlike the bare Vert.x variant, this method returns a
JsonObject. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionquery- the query used to match the documentreplace- the replacement documentfindOptions- options to configure the findupdateOptions- options to configure the update- Returns:
- The operation result
- See Also:
-
MongoClient.findOneAndReplaceWithOptions(String, JsonObject, JsonObject, FindOptions, UpdateOptions)
-
findOneAndReplaceWithOptionsAndForget
public MongoClient findOneAndReplaceWithOptionsAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.core.json.JsonObject replace, io.vertx.ext.mongo.FindOptions findOptions, io.vertx.ext.mongo.UpdateOptions updateOptions) Find a single matching document in the specified collection and replace it.This operation might change _id field of query parameter
Unlike the bare Vert.x variant, this method ignores the
JsonObjectresult or any failure.- Parameters:
collection- the collectionquery- the query used to match the documentreplace- the replacement documentfindOptions- options to configure the findupdateOptions- options to configure the update- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.findOneAndReplaceWithOptions(String, JsonObject, JsonObject, FindOptions, UpdateOptions)
-
findOneAndDelete
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.core.json.JsonObject> findOneAndDelete(String collection, io.vertx.core.json.JsonObject query) Find a single matching document in the specified collection and delete it.This operation might change _id field of query parameter
Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionquery- the query used to match the document- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.findOneAndDelete(String, JsonObject)
-
findOneAndDeleteAndAwait
public io.vertx.core.json.JsonObject findOneAndDeleteAndAwait(String collection, io.vertx.core.json.JsonObject query) Find a single matching document in the specified collection and delete it.This operation might change _id field of query parameter
Unlike the bare Vert.x variant, this method returns a
JsonObject. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionquery- the query used to match the document- Returns:
- The operation result
- See Also:
-
MongoClient.findOneAndDelete(String, JsonObject)
-
findOneAndDeleteAndForget
public MongoClient findOneAndDeleteAndForget(String collection, io.vertx.core.json.JsonObject query) Find a single matching document in the specified collection and delete it.This operation might change _id field of query parameter
Unlike the bare Vert.x variant, this method ignores the
JsonObjectresult or any failure.- Parameters:
collection- the collectionquery- the query used to match the document- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.findOneAndDelete(String, JsonObject)
-
findOneAndDeleteWithOptions
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.core.json.JsonObject> findOneAndDeleteWithOptions(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.FindOptions findOptions) Find a single matching document in the specified collection and delete it.This operation might change _id field of query parameter
Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionquery- the query used to match the documentfindOptions- options to configure the find- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.findOneAndDeleteWithOptions(String, JsonObject, FindOptions)
-
findOneAndDeleteWithOptionsAndAwait
public io.vertx.core.json.JsonObject findOneAndDeleteWithOptionsAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.FindOptions findOptions) Find a single matching document in the specified collection and delete it.This operation might change _id field of query parameter
Unlike the bare Vert.x variant, this method returns a
JsonObject. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionquery- the query used to match the documentfindOptions- options to configure the find- Returns:
- The operation result
- See Also:
-
MongoClient.findOneAndDeleteWithOptions(String, JsonObject, FindOptions)
-
findOneAndDeleteWithOptionsAndForget
public MongoClient findOneAndDeleteWithOptionsAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.FindOptions findOptions) Find a single matching document in the specified collection and delete it.This operation might change _id field of query parameter
Unlike the bare Vert.x variant, this method ignores the
JsonObjectresult or any failure.- Parameters:
collection- the collectionquery- the query used to match the documentfindOptions- options to configure the find- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.findOneAndDeleteWithOptions(String, JsonObject, FindOptions)
-
count
@CheckReturnValue public io.smallrye.mutiny.Uni<Long> count(String collection, io.vertx.core.json.JsonObject query) Count matching documents in a collection.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionquery- query used to match documents- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.count(String, JsonObject)
-
countAndAwait
Count matching documents in a collection.Unlike the bare Vert.x variant, this method returns a
Long. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionquery- query used to match documents- Returns:
- The operation result
- See Also:
-
MongoClient.count(String, JsonObject)
-
countAndForget
Count matching documents in a collection.Unlike the bare Vert.x variant, this method ignores the
Longresult or any failure.- Parameters:
collection- the collectionquery- query used to match documents- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.count(String, JsonObject)
-
countWithOptions
@CheckReturnValue public io.smallrye.mutiny.Uni<Long> countWithOptions(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.CountOptions countOptions) Count matching documents in a collection.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionquery- query used to match documentscountOptions-- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.countWithOptions(String, JsonObject, CountOptions)
-
countWithOptionsAndAwait
public Long countWithOptionsAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.CountOptions countOptions) Count matching documents in a collection.Unlike the bare Vert.x variant, this method returns a
Long. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionquery- query used to match documentscountOptions-- Returns:
- The operation result
- See Also:
-
MongoClient.countWithOptions(String, JsonObject, CountOptions)
-
countWithOptionsAndForget
public MongoClient countWithOptionsAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.CountOptions countOptions) Count matching documents in a collection.Unlike the bare Vert.x variant, this method ignores the
Longresult or any failure.- Parameters:
collection- the collectionquery- query used to match documentscountOptions-- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.countWithOptions(String, JsonObject, CountOptions)
-
removeDocuments
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.mongo.MongoClientDeleteResult> removeDocuments(String collection, io.vertx.core.json.JsonObject query) Remove matching documents from a collection and return the handler withMongoClientDeleteResultresultUnlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionquery- query used to match documents- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.removeDocuments(String, JsonObject)
-
removeDocumentsAndAwait
public io.vertx.ext.mongo.MongoClientDeleteResult removeDocumentsAndAwait(String collection, io.vertx.core.json.JsonObject query) Remove matching documents from a collection and return the handler withMongoClientDeleteResultresultUnlike the bare Vert.x variant, this method returns a
MongoClientDeleteResult. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionquery- query used to match documents- Returns:
- The operation result
- See Also:
-
MongoClient.removeDocuments(String, JsonObject)
-
removeDocumentsAndForget
Remove matching documents from a collection and return the handler withMongoClientDeleteResultresultUnlike the bare Vert.x variant, this method ignores the
MongoClientDeleteResultresult or any failure.- Parameters:
collection- the collectionquery- query used to match documents- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.removeDocuments(String, JsonObject)
-
removeDocumentsWithOptions
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.mongo.MongoClientDeleteResult> removeDocumentsWithOptions(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.WriteOption writeOption) Remove matching documents from a collection with the specified write option and return the handler withMongoClientDeleteResultresultUnlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionquery- query used to match documentswriteOption- the write option to use. Can benull.- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.removeDocumentsWithOptions(String, JsonObject, WriteOption)
-
removeDocumentsWithOptionsAndAwait
public io.vertx.ext.mongo.MongoClientDeleteResult removeDocumentsWithOptionsAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.WriteOption writeOption) Remove matching documents from a collection with the specified write option and return the handler withMongoClientDeleteResultresultUnlike the bare Vert.x variant, this method returns a
MongoClientDeleteResult. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionquery- query used to match documentswriteOption- the write option to use- Returns:
- The operation result
- See Also:
-
MongoClient.removeDocumentsWithOptions(String, JsonObject, WriteOption)
-
removeDocumentsWithOptionsAndForget
public MongoClient removeDocumentsWithOptionsAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.WriteOption writeOption) Remove matching documents from a collection with the specified write option and return the handler withMongoClientDeleteResultresultUnlike the bare Vert.x variant, this method ignores the
MongoClientDeleteResultresult or any failure.- Parameters:
collection- the collectionquery- query used to match documentswriteOption- the write option to use- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.removeDocumentsWithOptions(String, JsonObject, WriteOption)
-
removeDocument
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.mongo.MongoClientDeleteResult> removeDocument(String collection, io.vertx.core.json.JsonObject query) Remove a single matching document from a collection and return the handler withMongoClientDeleteResultresultUnlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionquery- query used to match document- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.removeDocument(String, JsonObject)
-
removeDocumentAndAwait
public io.vertx.ext.mongo.MongoClientDeleteResult removeDocumentAndAwait(String collection, io.vertx.core.json.JsonObject query) Remove a single matching document from a collection and return the handler withMongoClientDeleteResultresultUnlike the bare Vert.x variant, this method returns a
MongoClientDeleteResult. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionquery- query used to match document- Returns:
- The operation result
- See Also:
-
MongoClient.removeDocument(String, JsonObject)
-
removeDocumentAndForget
Remove a single matching document from a collection and return the handler withMongoClientDeleteResultresultUnlike the bare Vert.x variant, this method ignores the
MongoClientDeleteResultresult or any failure.- Parameters:
collection- the collectionquery- query used to match document- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.removeDocument(String, JsonObject)
-
removeDocumentWithOptions
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.mongo.MongoClientDeleteResult> removeDocumentWithOptions(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.WriteOption writeOption) Remove a single matching document from a collection with the specified write option and return the handler withMongoClientDeleteResultresultUnlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionquery- query used to match documentwriteOption- the write option to use. Can benull.- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.removeDocumentWithOptions(String, JsonObject, WriteOption)
-
removeDocumentWithOptionsAndAwait
public io.vertx.ext.mongo.MongoClientDeleteResult removeDocumentWithOptionsAndAwait(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.WriteOption writeOption) Remove a single matching document from a collection with the specified write option and return the handler withMongoClientDeleteResultresultUnlike the bare Vert.x variant, this method returns a
MongoClientDeleteResult. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionquery- query used to match documentwriteOption- the write option to use- Returns:
- The operation result
- See Also:
-
MongoClient.removeDocumentWithOptions(String, JsonObject, WriteOption)
-
removeDocumentWithOptionsAndForget
public MongoClient removeDocumentWithOptionsAndForget(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.WriteOption writeOption) Remove a single matching document from a collection with the specified write option and return the handler withMongoClientDeleteResultresultUnlike the bare Vert.x variant, this method ignores the
MongoClientDeleteResultresult or any failure.- Parameters:
collection- the collectionquery- query used to match documentwriteOption- the write option to use- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.removeDocumentWithOptions(String, JsonObject, WriteOption)
-
createCollection
Create a new collectionUnlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collectionName- the name of the collection- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.createCollection(String)
-
createCollectionAndAwait
Create a new collectionUnlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collectionName- the name of the collection- See Also:
-
MongoClient.createCollection(String)
-
createCollectionAndForget
Create a new collectionUnlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Parameters:
collectionName- the name of the collection- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.createCollection(String)
-
createCollectionWithOptions
@CheckReturnValue public io.smallrye.mutiny.Uni<Void> createCollectionWithOptions(String collectionName, io.vertx.ext.mongo.CreateCollectionOptions collectionOptions) Create a new collection with optionsUnlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collectionName- the name of the collectioncollectionOptions- options of the collection- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.createCollectionWithOptions(String, CreateCollectionOptions)
-
createCollectionWithOptionsAndAwait
public void createCollectionWithOptionsAndAwait(String collectionName, io.vertx.ext.mongo.CreateCollectionOptions collectionOptions) Create a new collection with optionsUnlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collectionName- the name of the collectioncollectionOptions- options of the collection- See Also:
-
MongoClient.createCollectionWithOptions(String, CreateCollectionOptions)
-
createCollectionWithOptionsAndForget
public MongoClient createCollectionWithOptionsAndForget(String collectionName, io.vertx.ext.mongo.CreateCollectionOptions collectionOptions) Create a new collection with optionsUnlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Parameters:
collectionName- the name of the collectioncollectionOptions- options of the collection- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.createCollectionWithOptions(String, CreateCollectionOptions)
-
getCollections
Get a list of all collections in the database.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.getCollections()
-
getCollectionsAndAwait
Get a list of all collections in the database.Unlike the bare Vert.x variant, this method returns a
List<String>. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Returns:
- The operation result
- See Also:
-
MongoClient.getCollections()
-
getCollectionsAndForget
Get a list of all collections in the database.Unlike the bare Vert.x variant, this method ignores the
List<String>result or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.getCollections()
-
dropCollection
Drop a collectionUnlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collection- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.dropCollection(String)
-
dropCollectionAndAwait
Drop a collectionUnlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collection- See Also:
-
MongoClient.dropCollection(String)
-
dropCollectionAndForget
Drop a collectionUnlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Parameters:
collection- the collection- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.dropCollection(String)
-
renameCollection
@CheckReturnValue public io.smallrye.mutiny.Uni<Void> renameCollection(String oldCollectionName, String newCollectionName) Rename a collectionUnlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
oldCollectionName- the name of the collectionnewCollectionName- the new name of the collection- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.renameCollection(String, String)
-
renameCollectionAndAwait
Rename a collectionUnlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
oldCollectionName- the name of the collectionnewCollectionName- the new name of the collection- See Also:
-
MongoClient.renameCollection(String, String)
-
renameCollectionAndForget
Rename a collectionUnlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Parameters:
oldCollectionName- the name of the collectionnewCollectionName- the new name of the collection- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.renameCollection(String, String)
-
renameCollectionWithOptions
@CheckReturnValue public io.smallrye.mutiny.Uni<Void> renameCollectionWithOptions(String oldCollectionName, String newCollectionName, io.vertx.ext.mongo.RenameCollectionOptions collectionOptions) Rename a collectionUnlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
oldCollectionName- the name of the collectionnewCollectionName- the new name of the collectioncollectionOptions- options of the collection- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.renameCollectionWithOptions(String, String, RenameCollectionOptions)
-
renameCollectionWithOptionsAndAwait
public void renameCollectionWithOptionsAndAwait(String oldCollectionName, String newCollectionName, io.vertx.ext.mongo.RenameCollectionOptions collectionOptions) Rename a collectionUnlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
oldCollectionName- the name of the collectionnewCollectionName- the new name of the collectioncollectionOptions- options of the collection- See Also:
-
MongoClient.renameCollectionWithOptions(String, String, RenameCollectionOptions)
-
renameCollectionWithOptionsAndForget
public MongoClient renameCollectionWithOptionsAndForget(String oldCollectionName, String newCollectionName, io.vertx.ext.mongo.RenameCollectionOptions collectionOptions) Rename a collectionUnlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Parameters:
oldCollectionName- the name of the collectionnewCollectionName- the new name of the collectioncollectionOptions- options of the collection- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.renameCollectionWithOptions(String, String, RenameCollectionOptions)
-
createIndex
@CheckReturnValue public io.smallrye.mutiny.Uni<Void> createIndex(String collection, io.vertx.core.json.JsonObject key) Creates an index.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionkey- A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.createIndex(String, JsonObject)
-
createIndexAndAwait
Creates an index.Unlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionkey- A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.- See Also:
-
MongoClient.createIndex(String, JsonObject)
-
createIndexAndForget
Creates an index.Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Parameters:
collection- the collectionkey- A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.createIndex(String, JsonObject)
-
createIndexWithOptions
@CheckReturnValue public io.smallrye.mutiny.Uni<Void> createIndexWithOptions(String collection, io.vertx.core.json.JsonObject key, io.vertx.ext.mongo.IndexOptions options) Creates an index.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionkey- A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.options- the options for the index- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.createIndexWithOptions(String, JsonObject, IndexOptions)
-
createIndexWithOptionsAndAwait
public void createIndexWithOptionsAndAwait(String collection, io.vertx.core.json.JsonObject key, io.vertx.ext.mongo.IndexOptions options) Creates an index.Unlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionkey- A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.options- the options for the index- See Also:
-
MongoClient.createIndexWithOptions(String, JsonObject, IndexOptions)
-
createIndexWithOptionsAndForget
public MongoClient createIndexWithOptionsAndForget(String collection, io.vertx.core.json.JsonObject key, io.vertx.ext.mongo.IndexOptions options) Creates an index.Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Parameters:
collection- the collectionkey- A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.options- the options for the index- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.createIndexWithOptions(String, JsonObject, IndexOptions)
-
createIndexes
@CheckReturnValue public io.smallrye.mutiny.Uni<Void> createIndexes(String collection, List<io.vertx.ext.mongo.IndexModel> indexes) creates an indexesUnlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionindexes- A model that contains pairs of document and indexOptions, document contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.createIndexes(String, List)
-
createIndexesAndAwait
creates an indexesUnlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionindexes- A model that contains pairs of document and indexOptions, document contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.- See Also:
-
MongoClient.createIndexes(String, List)
-
createIndexesAndForget
public MongoClient createIndexesAndForget(String collection, List<io.vertx.ext.mongo.IndexModel> indexes) creates an indexesUnlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Parameters:
collection- the collectionindexes- A model that contains pairs of document and indexOptions, document contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.createIndexes(String, List)
-
listIndexes
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.core.json.JsonArray> listIndexes(String collection) Get all the indexes in this collection.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collection- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.listIndexes(String)
-
listIndexesAndAwait
Get all the indexes in this collection.Unlike the bare Vert.x variant, this method returns a
JsonArray. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collection- Returns:
- The operation result
- See Also:
-
MongoClient.listIndexes(String)
-
listIndexesAndForget
Get all the indexes in this collection.Unlike the bare Vert.x variant, this method ignores the
JsonArrayresult or any failure.- Parameters:
collection- the collection- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.listIndexes(String)
-
dropIndex
@CheckReturnValue public io.smallrye.mutiny.Uni<Void> dropIndex(String collection, String indexName) Drops the index given its name.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionindexName- the name of the index to remove- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.dropIndex(String, String)
-
dropIndexAndAwait
Drops the index given its name.Unlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionindexName- the name of the index to remove- See Also:
-
MongoClient.dropIndex(String, String)
-
dropIndexAndForget
Drops the index given its name.Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Parameters:
collection- the collectionindexName- the name of the index to remove- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.dropIndex(String, String)
-
dropIndex
@CheckReturnValue public io.smallrye.mutiny.Uni<Void> dropIndex(String collection, io.vertx.core.json.JsonObject key) Drops the index given the keys used to create it.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionkey- the key(s) of the index to remove- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.dropIndex(String, JsonObject)
-
dropIndexAndAwait
Drops the index given the keys used to create it.Unlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionkey- the key(s) of the index to remove- See Also:
-
MongoClient.dropIndex(String, JsonObject)
-
dropIndexAndForget
Drops the index given the keys used to create it.Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Parameters:
collection- the collectionkey- the key(s) of the index to remove- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.dropIndex(String, JsonObject)
-
runCommand
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.core.json.JsonObject> runCommand(String commandName, io.vertx.core.json.JsonObject command) Run an arbitrary MongoDB command.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
commandName- the name of the commandcommand- the command- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.runCommand(String, JsonObject)
-
runCommandAndAwait
public io.vertx.core.json.JsonObject runCommandAndAwait(String commandName, io.vertx.core.json.JsonObject command) Run an arbitrary MongoDB command.Unlike the bare Vert.x variant, this method returns a
JsonObject. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
commandName- the name of the commandcommand- the command- Returns:
- The operation result
- See Also:
-
MongoClient.runCommand(String, JsonObject)
-
runCommandAndForget
Run an arbitrary MongoDB command.Unlike the bare Vert.x variant, this method ignores the
JsonObjectresult or any failure.- Parameters:
commandName- the name of the commandcommand- the command- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.runCommand(String, JsonObject)
-
distinct
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.core.json.JsonArray> distinct(String collection, String fieldName, String resultClassname) Gets the distinct values of the specified field name. Return a JsonArray containing distinct values (eg: [ 1 , 89 ])Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionfieldName- the field name- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.distinct(String, String, String)
-
distinctAndAwait
public io.vertx.core.json.JsonArray distinctAndAwait(String collection, String fieldName, String resultClassname) Gets the distinct values of the specified field name. Return a JsonArray containing distinct values (eg: [ 1 , 89 ])Unlike the bare Vert.x variant, this method returns a
JsonArray. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionfieldName- the field name- Returns:
- The operation result
- See Also:
-
MongoClient.distinct(String, String, String)
-
distinctAndForget
Gets the distinct values of the specified field name. Return a JsonArray containing distinct values (eg: [ 1 , 89 ])Unlike the bare Vert.x variant, this method ignores the
JsonArrayresult or any failure.- Parameters:
collection- the collectionfieldName- the field name- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.distinct(String, String, String)
-
distinct
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.core.json.JsonArray> distinct(String collection, String fieldName, String resultClassname, io.vertx.ext.mongo.DistinctOptions distinctOptions) Gets the distinct values of the specified field name. Return a JsonArray containing distinct values (eg: [ 1 , 89 ])Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionfieldName- the field namedistinctOptions- options (e.g. collation)- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.distinct(String, String, String, DistinctOptions)
-
distinctAndAwait
public io.vertx.core.json.JsonArray distinctAndAwait(String collection, String fieldName, String resultClassname, io.vertx.ext.mongo.DistinctOptions distinctOptions) Gets the distinct values of the specified field name. Return a JsonArray containing distinct values (eg: [ 1 , 89 ])Unlike the bare Vert.x variant, this method returns a
JsonArray. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionfieldName- the field namedistinctOptions- options (e.g. collation)- Returns:
- The operation result
- See Also:
-
MongoClient.distinct(String, String, String, DistinctOptions)
-
distinctAndForget
public MongoClient distinctAndForget(String collection, String fieldName, String resultClassname, io.vertx.ext.mongo.DistinctOptions distinctOptions) Gets the distinct values of the specified field name. Return a JsonArray containing distinct values (eg: [ 1 , 89 ])Unlike the bare Vert.x variant, this method ignores the
JsonArrayresult or any failure.- Parameters:
collection- the collectionfieldName- the field namedistinctOptions- options (e.g. collation)- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.distinct(String, String, String, DistinctOptions)
-
distinctWithQuery
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.core.json.JsonArray> distinctWithQuery(String collection, String fieldName, String resultClassname, io.vertx.core.json.JsonObject query) Gets the distinct values of the specified field name filtered by specified query. Return a JsonArray containing distinct values (eg: [ 1 , 89 ])Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionfieldName- the field namequery- the query- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.distinctWithQuery(String, String, String, JsonObject)
-
distinctWithQueryAndAwait
public io.vertx.core.json.JsonArray distinctWithQueryAndAwait(String collection, String fieldName, String resultClassname, io.vertx.core.json.JsonObject query) Gets the distinct values of the specified field name filtered by specified query. Return a JsonArray containing distinct values (eg: [ 1 , 89 ])Unlike the bare Vert.x variant, this method returns a
JsonArray. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionfieldName- the field namequery- the query- Returns:
- The operation result
- See Also:
-
MongoClient.distinctWithQuery(String, String, String, JsonObject)
-
distinctWithQueryAndForget
public MongoClient distinctWithQueryAndForget(String collection, String fieldName, String resultClassname, io.vertx.core.json.JsonObject query) Gets the distinct values of the specified field name filtered by specified query. Return a JsonArray containing distinct values (eg: [ 1 , 89 ])Unlike the bare Vert.x variant, this method ignores the
JsonArrayresult or any failure.- Parameters:
collection- the collectionfieldName- the field namequery- the query- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.distinctWithQuery(String, String, String, JsonObject)
-
distinctWithQuery
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.core.json.JsonArray> distinctWithQuery(String collection, String fieldName, String resultClassname, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.DistinctOptions distinctOptions) Gets the distinct values of the specified field name filtered by specified query. Return a JsonArray containing distinct values (eg: [ 1 , 89 ])Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
collection- the collectionfieldName- the field namequery- the querydistinctOptions- options (e.g. collation)- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.distinctWithQuery(String, String, String, JsonObject, DistinctOptions)
-
distinctWithQueryAndAwait
public io.vertx.core.json.JsonArray distinctWithQueryAndAwait(String collection, String fieldName, String resultClassname, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.DistinctOptions distinctOptions) Gets the distinct values of the specified field name filtered by specified query. Return a JsonArray containing distinct values (eg: [ 1 , 89 ])Unlike the bare Vert.x variant, this method returns a
JsonArray. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
collection- the collectionfieldName- the field namequery- the querydistinctOptions- options (e.g. collation)- Returns:
- The operation result
- See Also:
-
MongoClient.distinctWithQuery(String, String, String, JsonObject, DistinctOptions)
-
distinctWithQueryAndForget
public MongoClient distinctWithQueryAndForget(String collection, String fieldName, String resultClassname, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.DistinctOptions distinctOptions) Gets the distinct values of the specified field name filtered by specified query. Return a JsonArray containing distinct values (eg: [ 1 , 89 ])Unlike the bare Vert.x variant, this method ignores the
JsonArrayresult or any failure.- Parameters:
collection- the collectionfieldName- the field namequery- the querydistinctOptions- options (e.g. collation)- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.distinctWithQuery(String, String, String, JsonObject, DistinctOptions)
-
createDefaultGridFsBucketService
@CheckReturnValue public io.smallrye.mutiny.Uni<MongoGridFsClient> createDefaultGridFsBucketService()Creates aMongoGridFsClientused to interact with Mongo GridFS.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.createDefaultGridFsBucketService()
-
createDefaultGridFsBucketServiceAndAwait
Creates aMongoGridFsClientused to interact with Mongo GridFS.Unlike the bare Vert.x variant, this method returns a
MongoGridFsClient. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Returns:
- The operation result
- See Also:
-
MongoClient.createDefaultGridFsBucketService()
-
createDefaultGridFsBucketServiceAndForget
Creates aMongoGridFsClientused to interact with Mongo GridFS.Unlike the bare Vert.x variant, this method ignores the
MongoGridFsClientresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.createDefaultGridFsBucketService()
-
createGridFsBucketService
@CheckReturnValue public io.smallrye.mutiny.Uni<MongoGridFsClient> createGridFsBucketService(String bucketName) Creates aMongoGridFsClientused to interact with Mongo GridFS.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
bucketName- the name of the GridFS bucket- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.createGridFsBucketService(String)
-
createGridFsBucketServiceAndAwait
Creates aMongoGridFsClientused to interact with Mongo GridFS.Unlike the bare Vert.x variant, this method returns a
MongoGridFsClient. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
bucketName- the name of the GridFS bucket- Returns:
- The operation result
- See Also:
-
MongoClient.createGridFsBucketService(String)
-
createGridFsBucketServiceAndForget
Creates aMongoGridFsClientused to interact with Mongo GridFS.Unlike the bare Vert.x variant, this method ignores the
MongoGridFsClientresult or any failure.- Parameters:
bucketName- the name of the GridFS bucket- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.createGridFsBucketService(String)
-
close
Close the client and release its resourcesUnlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MongoClient.close()
-
closeAndAwait
public void closeAndAwait()Close the client and release its resourcesUnlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- See Also:
-
MongoClient.close()
-
closeAndForget
Close the client and release its resourcesUnlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MongoClient.close()
-
create
Create a Mongo client which maintains its own data source.- Parameters:
vertx- the Vert.x instanceconfig- the configuration- Returns:
- the client
-
findBatch
public ReadStream<io.vertx.core.json.JsonObject> findBatch(String collection, io.vertx.core.json.JsonObject query) Find matching documents in the specified collection. This method use batchCursor for returning each found document.- Parameters:
collection- the collectionquery- query used to match documents- Returns:
- a
ReadStreamemitting found documents
-
findBatchWithOptions
public ReadStream<io.vertx.core.json.JsonObject> findBatchWithOptions(String collection, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.FindOptions options) Find matching documents in the specified collection, specifying options. This method use batchCursor for returning each found document.- Parameters:
collection- the collectionquery- query used to match documentsoptions- options to configure the find- Returns:
- a
ReadStreamemitting found documents
-
distinctBatch
public ReadStream<io.vertx.core.json.JsonObject> distinctBatch(String collection, String fieldName, String resultClassname) Gets the distinct values of the specified field name. This method use batchCursor for returning each found value. Each value is a json fragment with fieldName key (eg: {"num": 1}).- Parameters:
collection- the collectionfieldName- the field name- Returns:
- a
ReadStreamemitting json fragments
-
distinctBatch
public ReadStream<io.vertx.core.json.JsonObject> distinctBatch(String collection, String fieldName, String resultClassname, io.vertx.ext.mongo.DistinctOptions distinctOptions) Gets the distinct values of the specified field name. This method use batchCursor for returning each found value. Each value is a json fragment with fieldName key (eg: {"num": 1}).- Parameters:
collection- the collectionfieldName- the field namedistinctOptions- options (e.g. collation)- Returns:
- a
ReadStreamemitting json fragments
-
distinctBatchWithQuery
public ReadStream<io.vertx.core.json.JsonObject> distinctBatchWithQuery(String collection, String fieldName, String resultClassname, io.vertx.core.json.JsonObject query) Gets the distinct values of the specified field name filtered by specified query. This method use batchCursor for returning each found value. Each value is a json fragment with fieldName key (eg: {"num": 1}).- Parameters:
collection- the collectionfieldName- the field namequery- the query- Returns:
- a
ReadStreamemitting json fragments
-
distinctBatchWithQuery
public ReadStream<io.vertx.core.json.JsonObject> distinctBatchWithQuery(String collection, String fieldName, String resultClassname, io.vertx.core.json.JsonObject query, io.vertx.ext.mongo.DistinctOptions distinctOptions) Gets the distinct values of the specified field name filtered by specified query. This method use batchCursor for returning each found value. Each value is a json fragment with fieldName key (eg: {"num": 1}).- Parameters:
collection- the collectionfieldName- the field namequery- the querydistinctOptions- options (e.g. collation)- Returns:
- a
ReadStreamemitting json fragments
-
distinctBatchWithQuery
public ReadStream<io.vertx.core.json.JsonObject> distinctBatchWithQuery(String collection, String fieldName, String resultClassname, io.vertx.core.json.JsonObject query, int batchSize) Gets the distinct values of the specified field name filtered by specified query. This method use batchCursor for returning each found value. Each value is a json fragment with fieldName key (eg: {"num": 1}).- Parameters:
collection- the collectionfieldName- the field namequery- the querybatchSize- the number of documents to load in a batch- Returns:
- a
ReadStreamemitting json fragments
-
distinctBatchWithQuery
public ReadStream<io.vertx.core.json.JsonObject> distinctBatchWithQuery(String collection, String fieldName, String resultClassname, io.vertx.core.json.JsonObject query, int batchSize, io.vertx.ext.mongo.DistinctOptions distinctOptions) Gets the distinct values of the specified field name filtered by specified query. This method use batchCursor for returning each found value. Each value is a json fragment with fieldName key (eg: {"num": 1}).- Parameters:
collection- the collectionfieldName- the field namequery- the querybatchSize- the number of documents to load in a batchdistinctOptions- options (e.g. collation)- Returns:
- a
ReadStreamemitting json fragments
-
aggregate
public ReadStream<io.vertx.core.json.JsonObject> aggregate(String collection, io.vertx.core.json.JsonArray pipeline) Run aggregate MongoDB command with defaultAggregateOptions.- Parameters:
collection- the collectionpipeline- aggregation pipeline to be executed
-
aggregateWithOptions
public ReadStream<io.vertx.core.json.JsonObject> aggregateWithOptions(String collection, io.vertx.core.json.JsonArray pipeline, io.vertx.ext.mongo.AggregateOptions options) Run aggregate MongoDB command.- Parameters:
collection- the collectionpipeline- aggregation pipeline to be executedoptions- options to configure the aggregation command
-
watch
public ReadStream<com.mongodb.client.model.changestream.ChangeStreamDocument<io.vertx.core.json.JsonObject>> watch(String collection, io.vertx.core.json.JsonArray pipeline, boolean withUpdatedDoc, int batchSize) Watch the collection change.- Parameters:
collection- the collectionpipeline- watching pipeline to be executedwithUpdatedDoc- whether to get updated fullDocument for "update" operationbatchSize- the number of documents to load in a batch
-
newInstance
Creates a new instance of theMongoClient. -
hashCode
public int hashCode() -
equals
-
toString
-