Class MongoClient

java.lang.Object
io.vertx.mutiny.ext.mongo.MongoClient
All Implemented Interfaces:
MutinyDelegate

public class MongoClient extends Object implements MutinyDelegate
A Vert.x service used to interact with MongoDB server instances.

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

    Fields
    Modifier and Type
    Field
    Description
    static final TypeArg<MongoClient>
     
    static final String
    The name of the default database
    static final String
    The name of the default pool
  • Constructor Summary

    Constructors
    Constructor
    Description
    MongoClient(io.vertx.ext.mongo.MongoClient delegate)
    Create a new instance of MongoClient delegating to the given (non-null) instance of MongoClient.
    MongoClient(Object delegate)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    ReadStream<io.vertx.core.json.JsonObject>
    aggregate(String collection, io.vertx.core.json.JsonArray pipeline)
    Run aggregate MongoDB command with default AggregateOptions.
    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>
    bulkWrite(String collection, List<io.vertx.ext.mongo.BulkOperation> operations)
    Execute a bulk operation.
    io.vertx.ext.mongo.MongoClientBulkWriteResult
    bulkWriteAndAwait(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.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.
    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 the client and release its resources
    void
    Close the client and release its resources
    Close the client and release its resources
    io.smallrye.mutiny.Uni<Long>
    count(String collection, io.vertx.core.json.JsonObject query)
    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.
    create(Vertx vertx, io.vertx.core.json.JsonObject config)
    Create a Mongo client which maintains its own data source.
    io.smallrye.mutiny.Uni<Void>
    createCollection(String collectionName)
    Create a new collection
    void
    Create a new collection
    Create a new collection
    io.smallrye.mutiny.Uni<Void>
    createCollectionWithOptions(String collectionName, io.vertx.ext.mongo.CreateCollectionOptions collectionOptions)
    Create a new collection with options
    void
    createCollectionWithOptionsAndAwait(String collectionName, io.vertx.ext.mongo.CreateCollectionOptions collectionOptions)
    Create a new collection with options
    createCollectionWithOptionsAndForget(String collectionName, io.vertx.ext.mongo.CreateCollectionOptions collectionOptions)
    Create a new collection with options
    io.smallrye.mutiny.Uni<MongoGridFsClient>
    Creates a MongoGridFsClient used to interact with Mongo GridFS.
    Creates a MongoGridFsClient used to interact with Mongo GridFS.
    Creates a MongoGridFsClient used to interact with Mongo GridFS.
    io.smallrye.mutiny.Uni<MongoGridFsClient>
    Creates a MongoGridFsClient used to interact with Mongo GridFS.
    Creates a MongoGridFsClient used to interact with Mongo GridFS.
    Creates a MongoGridFsClient used to interact with Mongo GridFS.
    io.smallrye.mutiny.Uni<Void>
    createIndex(String collection, io.vertx.core.json.JsonObject key)
    Creates an index.
    void
    createIndexAndAwait(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 indexes
    void
    createIndexesAndAwait(String collection, List<io.vertx.ext.mongo.IndexModel> indexes)
    creates an indexes
    createIndexesAndForget(String collection, List<io.vertx.ext.mongo.IndexModel> indexes)
    creates an indexes
    io.smallrye.mutiny.Uni<Void>
    createIndexWithOptions(String collection, io.vertx.core.json.JsonObject key, io.vertx.ext.mongo.IndexOptions options)
    Creates an index.
    void
    createIndexWithOptionsAndAwait(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.
    createShared(Vertx vertx, io.vertx.core.json.JsonObject config)
    Like createShared(io.vertx.mutiny.core.Vertx, JsonObject, String) but with the default data source name
    createShared(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 name
    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.
    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.JsonArray
    distinctAndAwait(String collection, String fieldName, String resultClassname)
    Gets the distinct values of the specified field name.
    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.
    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.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.
    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.
    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 collection
    void
    Drop a collection
    Drop a collection
    io.smallrye.mutiny.Uni<Void>
    dropIndex(String collection, io.vertx.core.json.JsonObject key)
    Drops the index given the keys used to create it.
    io.smallrye.mutiny.Uni<Void>
    dropIndex(String collection, String indexName)
    Drops the index given its name.
    void
    dropIndexAndAwait(String collection, io.vertx.core.json.JsonObject key)
    Drops the index given the keys used to create it.
    void
    dropIndexAndAwait(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.
    boolean
     
    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 collection
    List<io.vertx.core.json.JsonObject>
    findAndAwait(String collection, io.vertx.core.json.JsonObject query)
    Find matching documents in the specified collection
    findAndForget(String collection, io.vertx.core.json.JsonObject query)
    Find matching documents in the specified collection
    ReadStream<io.vertx.core.json.JsonObject>
    findBatch(String collection, io.vertx.core.json.JsonObject query)
    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 collection
    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 collection
    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.
    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.
    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.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.
    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 collection
    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.
    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.
    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.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.
    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.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.
    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.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.
    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 options
    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 options
    findWithOptionsAndForget(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<List<String>>
    Get 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.MongoClient
    Get the delegate instance.
    int
     
    io.smallrye.mutiny.Uni<String>
    insert(String collection, io.vertx.core.json.JsonObject document)
    Insert a document in the specified collection
    insertAndAwait(String collection, io.vertx.core.json.JsonObject document)
    Insert a document in the specified collection
    insertAndForget(String collection, io.vertx.core.json.JsonObject document)
    Insert a document in the specified collection
    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 option
    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 option
    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 option
    io.smallrye.mutiny.Uni<io.vertx.core.json.JsonArray>
    listIndexes(String collection)
    Get all the indexes in this collection.
    io.vertx.core.json.JsonArray
    Get all the indexes in this collection.
    Get all the indexes in this collection.
    newInstance(io.vertx.ext.mongo.MongoClient delegate)
    Creates a new instance of the MongoClient.
    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 with MongoClientDeleteResult result
    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 with MongoClientDeleteResult result
    removeDocumentAndForget(String collection, io.vertx.core.json.JsonObject query)
    Remove a single matching document from a collection and return the handler with MongoClientDeleteResult result
    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 with MongoClientDeleteResult result
    io.vertx.ext.mongo.MongoClientDeleteResult
    removeDocumentsAndAwait(String collection, io.vertx.core.json.JsonObject query)
    Remove matching documents from a collection and return the handler with MongoClientDeleteResult result
    removeDocumentsAndForget(String collection, io.vertx.core.json.JsonObject query)
    Remove matching documents from a collection and return the handler with MongoClientDeleteResult result
    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 with MongoClientDeleteResult result
    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 with MongoClientDeleteResult result
    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 with MongoClientDeleteResult result
    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 with MongoClientDeleteResult result
    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 with MongoClientDeleteResult result
    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 with MongoClientDeleteResult result
    io.smallrye.mutiny.Uni<Void>
    renameCollection(String oldCollectionName, String newCollectionName)
    Rename a collection
    void
    renameCollectionAndAwait(String oldCollectionName, String newCollectionName)
    Rename a collection
    renameCollectionAndForget(String oldCollectionName, String newCollectionName)
    Rename a collection
    io.smallrye.mutiny.Uni<Void>
    renameCollectionWithOptions(String oldCollectionName, String newCollectionName, io.vertx.ext.mongo.RenameCollectionOptions collectionOptions)
    Rename a collection
    void
    renameCollectionWithOptionsAndAwait(String oldCollectionName, String newCollectionName, io.vertx.ext.mongo.RenameCollectionOptions collectionOptions)
    Rename a collection
    renameCollectionWithOptionsAndForget(String oldCollectionName, String newCollectionName, io.vertx.ext.mongo.RenameCollectionOptions collectionOptions)
    Rename a collection
    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 with MongoClientUpdateResult result
    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 with MongoClientUpdateResult result
    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 with MongoClientUpdateResult result
    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 with MongoClientUpdateResult result
    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 with MongoClientUpdateResult result
    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 with MongoClientUpdateResult result
    io.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.JsonObject
    runCommandAndAwait(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(String collection, io.vertx.core.json.JsonObject document)
    Save a document in the specified collection
    saveAndAwait(String collection, io.vertx.core.json.JsonObject document)
    Save a document in the specified collection
    saveAndForget(String collection, io.vertx.core.json.JsonObject document)
    Save a document in the specified collection
    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 option
    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 option
    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 option
     
    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 with MongoClientUpdateResult result
    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 with MongoClientUpdateResult result
    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 with MongoClientUpdateResult result
    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 with MongoClientUpdateResult result
    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 with MongoClientUpdateResult result
    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 with MongoClientUpdateResult result
    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 with MongoClientUpdateResult result
    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 with MongoClientUpdateResult result
    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 with MongoClientUpdateResult result
    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 with MongoClientUpdateResult result
    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 with MongoClientUpdateResult result
    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 with MongoClientUpdateResult result
    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.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • MongoClient

      public MongoClient(io.vertx.ext.mongo.MongoClient delegate)
      Create a new instance of MongoClient delegating to the given (non-null) instance of MongoClient.
    • MongoClient

      public MongoClient(Object delegate)
  • 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:
      getDelegate in interface MutinyDelegate
      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 collection

      This 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 collection
      document - the document
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • MongoClient.save(String, JsonObject)
    • saveAndAwait

      public String saveAndAwait(String collection, io.vertx.core.json.JsonObject document)
      Save a document in the specified collection

      This 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 a RuntimeException).

      Parameters:
      collection - the collection
      document - the document
      Returns:
      The operation result
      See Also:
      • MongoClient.save(String, JsonObject)
    • saveAndForget

      public MongoClient saveAndForget(String collection, io.vertx.core.json.JsonObject document)
      Save a document in the specified collection

      This operation might change _id field of document parameter

      Unlike the bare Vert.x variant, this method ignores the String result or any failure.

      Parameters:
      collection - the collection
      document - 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 option

      This 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 collection
      document - the document
      writeOption - the write option to use. Can be null.
      Returns:
      A Uni representing 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 option

      This 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 a RuntimeException).

      Parameters:
      collection - the collection
      document - the document
      writeOption - 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 option

      This operation might change _id field of document parameter

      Unlike the bare Vert.x variant, this method ignores the String result or any failure.

      Parameters:
      collection - the collection
      document - the document
      writeOption - 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 collection

      This 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 collection
      document - the document
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • MongoClient.insert(String, JsonObject)
    • insertAndAwait

      public String insertAndAwait(String collection, io.vertx.core.json.JsonObject document)
      Insert a document in the specified collection

      This 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 a RuntimeException).

      Parameters:
      collection - the collection
      document - the document
      Returns:
      The operation result
      See Also:
      • MongoClient.insert(String, JsonObject)
    • insertAndForget

      public MongoClient insertAndForget(String collection, io.vertx.core.json.JsonObject document)
      Insert a document in the specified collection

      This operation might change _id field of document parameter

      Unlike the bare Vert.x variant, this method ignores the String result or any failure.

      Parameters:
      collection - the collection
      document - 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 option

      This 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 collection
      document - the document
      writeOption - the write option to use. Can be null.
      Returns:
      A Uni representing 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 option

      This 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 a RuntimeException).

      Parameters:
      collection - the collection
      document - the document
      writeOption - 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 option

      This operation might change _id field of document parameter

      Unlike the bare Vert.x variant, this method ignores the String result or any failure.

      Parameters:
      collection - the collection
      document - the document
      writeOption - 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 with MongoClientUpdateResult result

      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
      query - query used to match the documents
      update - used to describe how the documents will be updated
      Returns:
      A Uni representing 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 with MongoClientUpdateResult result

      Unlike 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 a RuntimeException).

      Parameters:
      collection - the collection
      query - query used to match the documents
      update - 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 with MongoClientUpdateResult result

      Unlike the bare Vert.x variant, this method ignores the MongoClientUpdateResult result or any failure.

      Parameters:
      collection - the collection
      query - query used to match the documents
      update - 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 with MongoClientUpdateResult result

      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
      query - query used to match the documents
      update - used to describe how the documents will be updated
      Returns:
      A Uni representing 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 with MongoClientUpdateResult result

      Unlike 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 a RuntimeException).

      Parameters:
      collection - the collection
      query - query used to match the documents
      update - 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 with MongoClientUpdateResult result

      Unlike the bare Vert.x variant, this method ignores the MongoClientUpdateResult result or any failure.

      Parameters:
      collection - the collection
      query - query used to match the documents
      update - 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 with MongoClientUpdateResult result

      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
      query - query used to match the documents
      update - used to describe how the documents will be updated
      options - options to configure the update
      Returns:
      A Uni representing 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 with MongoClientUpdateResult result

      Unlike 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 a RuntimeException).

      Parameters:
      collection - the collection
      query - query used to match the documents
      update - used to describe how the documents will be updated
      options - 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 with MongoClientUpdateResult result

      Unlike the bare Vert.x variant, this method ignores the MongoClientUpdateResult result or any failure.

      Parameters:
      collection - the collection
      query - query used to match the documents
      update - used to describe how the documents will be updated
      options - 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 with MongoClientUpdateResult result

      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
      query - query used to match the documents
      update - aggregation pipeline used to describe how documents will be updated
      options - options to configure the update
      Returns:
      A Uni representing 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 with MongoClientUpdateResult result

      Unlike 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 a RuntimeException).

      Parameters:
      collection - the collection
      query - query used to match the documents
      update - aggregation pipeline used to describe how documents will be updated
      options - 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 with MongoClientUpdateResult result

      Unlike the bare Vert.x variant, this method ignores the MongoClientUpdateResult result or any failure.

      Parameters:
      collection - the collection
      query - query used to match the documents
      update - aggregation pipeline used to describe how documents will be updated
      options - 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 with MongoClientUpdateResult result

      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
      query - query used to match the documents
      replace - all matching documents will be replaced with this
      Returns:
      A Uni representing 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 with MongoClientUpdateResult result

      Unlike 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 a RuntimeException).

      Parameters:
      collection - the collection
      query - query used to match the documents
      replace - 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 with MongoClientUpdateResult result

      Unlike the bare Vert.x variant, this method ignores the MongoClientUpdateResult result or any failure.

      Parameters:
      collection - the collection
      query - query used to match the documents
      replace - 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 with MongoClientUpdateResult result

      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
      query - query used to match the documents
      replace - all matching documents will be replaced with this
      options - options to configure the replace
      Returns:
      A Uni representing 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 with MongoClientUpdateResult result

      Unlike 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 a RuntimeException).

      Parameters:
      collection - the collection
      query - query used to match the documents
      replace - all matching documents will be replaced with this
      options - 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 with MongoClientUpdateResult result

      Unlike the bare Vert.x variant, this method ignores the MongoClientUpdateResult result or any failure.

      Parameters:
      collection - the collection
      query - query used to match the documents
      replace - all matching documents will be replaced with this
      options - 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 collection
      operations - the operations to execute
      Returns:
      A Uni representing 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 a RuntimeException).

      Parameters:
      collection - the collection
      operations - 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 MongoClientBulkWriteResult result or any failure.

      Parameters:
      collection - the collection
      operations - 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 collection
      operations - the operations to execute
      bulkWriteOptions - the write options
      Returns:
      A Uni representing 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 a RuntimeException).

      Parameters:
      collection - the collection
      operations - the operations to execute
      bulkWriteOptions - 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 MongoClientBulkWriteResult result or any failure.

      Parameters:
      collection - the collection
      operations - the operations to execute
      bulkWriteOptions - 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 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
      query - query used to match documents
      Returns:
      A Uni representing 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 collection

      Unlike 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 a RuntimeException).

      Parameters:
      collection - the collection
      query - query used to match documents
      Returns:
      The operation result
      See Also:
      • MongoClient.find(String, JsonObject)
    • findAndForget

      public MongoClient findAndForget(String collection, io.vertx.core.json.JsonObject query)
      Find matching documents in the specified collection

      Unlike the bare Vert.x variant, this method ignores the List<io.vertx.core.json.JsonObject> result or any failure.

      Parameters:
      collection - the collection
      query - 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 options

      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
      query - query used to match documents
      options - options to configure the find
      Returns:
      A Uni representing 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 options

      Unlike 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 a RuntimeException).

      Parameters:
      collection - the collection
      query - query used to match documents
      options - 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 options

      Unlike the bare Vert.x variant, this method ignores the List<io.vertx.core.json.JsonObject> result or any failure.

      Parameters:
      collection - the collection
      query - query used to match documents
      options - 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 collection

      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 collection
      query - the query used to match the document
      fields - the fields. Can be null.
      Returns:
      A Uni representing 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 collection

      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 a RuntimeException).

      Parameters:
      collection - the collection
      query - the query used to match the document
      fields - 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 collection

      This operation might change _id field of query parameter

      Unlike the bare Vert.x variant, this method ignores the JsonObject result or any failure.

      Parameters:
      collection - the collection
      query - the query used to match the document
      fields - 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 collection
      query - the query used to match the document
      update - used to describe how the documents will be updated
      Returns:
      A Uni representing 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 a RuntimeException).

      Parameters:
      collection - the collection
      query - the query used to match the document
      update - 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 JsonObject result or any failure.

      Parameters:
      collection - the collection
      query - the query used to match the document
      update - 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 collection
      query - the query used to match the document
      update - used to describe how the documents will be updated
      findOptions - options to configure the find
      updateOptions - options to configure the update
      Returns:
      A Uni representing 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 a RuntimeException).

      Parameters:
      collection - the collection
      query - the query used to match the document
      update - used to describe how the documents will be updated
      findOptions - options to configure the find
      updateOptions - 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 JsonObject result or any failure.

      Parameters:
      collection - the collection
      query - the query used to match the document
      update - used to describe how the documents will be updated
      findOptions - options to configure the find
      updateOptions - 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 collection
      query - the query used to match the document
      replace - the replacement document
      Returns:
      A Uni representing 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 a RuntimeException).

      Parameters:
      collection - the collection
      query - the query used to match the document
      replace - 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 JsonObject result or any failure.

      Parameters:
      collection - the collection
      query - the query used to match the document
      replace - 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 collection
      query - the query used to match the document
      replace - the replacement document
      findOptions - options to configure the find
      updateOptions - options to configure the update
      Returns:
      A Uni representing 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 a RuntimeException).

      Parameters:
      collection - the collection
      query - the query used to match the document
      replace - the replacement document
      findOptions - options to configure the find
      updateOptions - 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 JsonObject result or any failure.

      Parameters:
      collection - the collection
      query - the query used to match the document
      replace - the replacement document
      findOptions - options to configure the find
      updateOptions - 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 collection
      query - the query used to match the document
      Returns:
      A Uni representing 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 a RuntimeException).

      Parameters:
      collection - the collection
      query - 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 JsonObject result or any failure.

      Parameters:
      collection - the collection
      query - 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 collection
      query - the query used to match the document
      findOptions - options to configure the find
      Returns:
      A Uni representing 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 a RuntimeException).

      Parameters:
      collection - the collection
      query - the query used to match the document
      findOptions - 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 JsonObject result or any failure.

      Parameters:
      collection - the collection
      query - the query used to match the document
      findOptions - 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 collection
      query - query used to match documents
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • MongoClient.count(String, JsonObject)
    • countAndAwait

      public Long countAndAwait(String collection, io.vertx.core.json.JsonObject query)
      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 a RuntimeException).

      Parameters:
      collection - the collection
      query - query used to match documents
      Returns:
      The operation result
      See Also:
      • MongoClient.count(String, JsonObject)
    • countAndForget

      public MongoClient countAndForget(String collection, io.vertx.core.json.JsonObject query)
      Count matching documents in a collection.

      Unlike the bare Vert.x variant, this method ignores the Long result or any failure.

      Parameters:
      collection - the collection
      query - 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 collection
      query - query used to match documents
      countOptions -
      Returns:
      A Uni representing 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 a RuntimeException).

      Parameters:
      collection - the collection
      query - query used to match documents
      countOptions -
      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 Long result or any failure.

      Parameters:
      collection - the collection
      query - query used to match documents
      countOptions -
      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 with MongoClientDeleteResult result

      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
      query - query used to match documents
      Returns:
      A Uni representing 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 with MongoClientDeleteResult result

      Unlike 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 a RuntimeException).

      Parameters:
      collection - the collection
      query - query used to match documents
      Returns:
      The operation result
      See Also:
      • MongoClient.removeDocuments(String, JsonObject)
    • removeDocumentsAndForget

      public MongoClient removeDocumentsAndForget(String collection, io.vertx.core.json.JsonObject query)
      Remove matching documents from a collection and return the handler with MongoClientDeleteResult result

      Unlike the bare Vert.x variant, this method ignores the MongoClientDeleteResult result or any failure.

      Parameters:
      collection - the collection
      query - 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 with MongoClientDeleteResult result

      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
      query - query used to match documents
      writeOption - the write option to use. Can be null.
      Returns:
      A Uni representing 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 with MongoClientDeleteResult result

      Unlike 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 a RuntimeException).

      Parameters:
      collection - the collection
      query - query used to match documents
      writeOption - 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 with MongoClientDeleteResult result

      Unlike the bare Vert.x variant, this method ignores the MongoClientDeleteResult result or any failure.

      Parameters:
      collection - the collection
      query - query used to match documents
      writeOption - 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 with MongoClientDeleteResult result

      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
      query - query used to match document
      Returns:
      A Uni representing 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 with MongoClientDeleteResult result

      Unlike 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 a RuntimeException).

      Parameters:
      collection - the collection
      query - query used to match document
      Returns:
      The operation result
      See Also:
      • MongoClient.removeDocument(String, JsonObject)
    • removeDocumentAndForget

      public MongoClient removeDocumentAndForget(String collection, io.vertx.core.json.JsonObject query)
      Remove a single matching document from a collection and return the handler with MongoClientDeleteResult result

      Unlike the bare Vert.x variant, this method ignores the MongoClientDeleteResult result or any failure.

      Parameters:
      collection - the collection
      query - 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 with MongoClientDeleteResult result

      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
      query - query used to match document
      writeOption - the write option to use. Can be null.
      Returns:
      A Uni representing 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 with MongoClientDeleteResult result

      Unlike 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 a RuntimeException).

      Parameters:
      collection - the collection
      query - query used to match document
      writeOption - 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 with MongoClientDeleteResult result

      Unlike the bare Vert.x variant, this method ignores the MongoClientDeleteResult result or any failure.

      Parameters:
      collection - the collection
      query - query used to match document
      writeOption - the write option to use
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • MongoClient.removeDocumentWithOptions(String, JsonObject, WriteOption)
    • createCollection

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> createCollection(String collectionName)
      Create a new 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:
      collectionName - the name of the collection
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • MongoClient.createCollection(String)
    • createCollectionAndAwait

      public void createCollectionAndAwait(String collectionName)
      Create a new collection

      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 a RuntimeException).

      Parameters:
      collectionName - the name of the collection
      See Also:
      • MongoClient.createCollection(String)
    • createCollectionAndForget

      public MongoClient createCollectionAndForget(String collectionName)
      Create a new collection

      Unlike the bare Vert.x variant, this method ignores the Void result 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 options

      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:
      collectionName - the name of the collection
      collectionOptions - options of the collection
      Returns:
      A Uni representing 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 options

      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 a RuntimeException).

      Parameters:
      collectionName - the name of the collection
      collectionOptions - 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 options

      Unlike the bare Vert.x variant, this method ignores the Void result or any failure.

      Parameters:
      collectionName - the name of the collection
      collectionOptions - options of the collection
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • MongoClient.createCollectionWithOptions(String, CreateCollectionOptions)
    • getCollections

      @CheckReturnValue public io.smallrye.mutiny.Uni<List<String>> 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 Uni representing the asynchronous result of this operation.
      See Also:
      • MongoClient.getCollections()
    • getCollectionsAndAwait

      public List<String> 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 a RuntimeException).

      Returns:
      The operation result
      See Also:
      • MongoClient.getCollections()
    • getCollectionsAndForget

      public MongoClient 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

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> dropCollection(String collection)
      Drop 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 collection
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • MongoClient.dropCollection(String)
    • dropCollectionAndAwait

      public void dropCollectionAndAwait(String collection)
      Drop a collection

      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 a RuntimeException).

      Parameters:
      collection - the collection
      See Also:
      • MongoClient.dropCollection(String)
    • dropCollectionAndForget

      public MongoClient dropCollectionAndForget(String collection)
      Drop a collection

      Unlike the bare Vert.x variant, this method ignores the Void result 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 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:
      oldCollectionName - the name of the collection
      newCollectionName - the new name of the collection
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • MongoClient.renameCollection(String, String)
    • renameCollectionAndAwait

      public void renameCollectionAndAwait(String oldCollectionName, String newCollectionName)
      Rename a collection

      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 a RuntimeException).

      Parameters:
      oldCollectionName - the name of the collection
      newCollectionName - the new name of the collection
      See Also:
      • MongoClient.renameCollection(String, String)
    • renameCollectionAndForget

      public MongoClient renameCollectionAndForget(String oldCollectionName, String newCollectionName)
      Rename a collection

      Unlike the bare Vert.x variant, this method ignores the Void result or any failure.

      Parameters:
      oldCollectionName - the name of the collection
      newCollectionName - 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 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:
      oldCollectionName - the name of the collection
      newCollectionName - the new name of the collection
      collectionOptions - options of the collection
      Returns:
      A Uni representing 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 collection

      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 a RuntimeException).

      Parameters:
      oldCollectionName - the name of the collection
      newCollectionName - the new name of the collection
      collectionOptions - 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 collection

      Unlike the bare Vert.x variant, this method ignores the Void result or any failure.

      Parameters:
      oldCollectionName - the name of the collection
      newCollectionName - the new name of the collection
      collectionOptions - 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 collection
      key - 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 Uni representing the asynchronous result of this operation.
      See Also:
      • MongoClient.createIndex(String, JsonObject)
    • createIndexAndAwait

      public void createIndexAndAwait(String collection, io.vertx.core.json.JsonObject key)
      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 a RuntimeException).

      Parameters:
      collection - the collection
      key - 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

      public MongoClient createIndexAndForget(String collection, io.vertx.core.json.JsonObject key)
      Creates an index.

      Unlike the bare Vert.x variant, this method ignores the Void result or any failure.

      Parameters:
      collection - the collection
      key - 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 collection
      key - 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 Uni representing 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 a RuntimeException).

      Parameters:
      collection - the collection
      key - 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 Void result or any failure.

      Parameters:
      collection - the collection
      key - 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 indexes

      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
      indexes - 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 Uni representing the asynchronous result of this operation.
      See Also:
      • MongoClient.createIndexes(String, List)
    • createIndexesAndAwait

      public void createIndexesAndAwait(String collection, List<io.vertx.ext.mongo.IndexModel> indexes)
      creates an indexes

      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 a RuntimeException).

      Parameters:
      collection - the collection
      indexes - 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 indexes

      Unlike the bare Vert.x variant, this method ignores the Void result or any failure.

      Parameters:
      collection - the collection
      indexes - 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 Uni representing the asynchronous result of this operation.
      See Also:
      • MongoClient.listIndexes(String)
    • listIndexesAndAwait

      public io.vertx.core.json.JsonArray listIndexesAndAwait(String collection)
      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 a RuntimeException).

      Parameters:
      collection - the collection
      Returns:
      The operation result
      See Also:
      • MongoClient.listIndexes(String)
    • listIndexesAndForget

      public MongoClient listIndexesAndForget(String collection)
      Get all the indexes in this collection.

      Unlike the bare Vert.x variant, this method ignores the JsonArray result 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 collection
      indexName - the name of the index to remove
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • MongoClient.dropIndex(String, String)
    • dropIndexAndAwait

      public void dropIndexAndAwait(String collection, String indexName)
      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 a RuntimeException).

      Parameters:
      collection - the collection
      indexName - the name of the index to remove
      See Also:
      • MongoClient.dropIndex(String, String)
    • dropIndexAndForget

      public MongoClient dropIndexAndForget(String collection, String indexName)
      Drops the index given its name.

      Unlike the bare Vert.x variant, this method ignores the Void result or any failure.

      Parameters:
      collection - the collection
      indexName - 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 collection
      key - the key(s) of the index to remove
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • MongoClient.dropIndex(String, JsonObject)
    • dropIndexAndAwait

      public void dropIndexAndAwait(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 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 a RuntimeException).

      Parameters:
      collection - the collection
      key - the key(s) of the index to remove
      See Also:
      • MongoClient.dropIndex(String, JsonObject)
    • dropIndexAndForget

      public MongoClient dropIndexAndForget(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 ignores the Void result or any failure.

      Parameters:
      collection - the collection
      key - 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 command
      command - the command
      Returns:
      A Uni representing 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 a RuntimeException).

      Parameters:
      commandName - the name of the command
      command - the command
      Returns:
      The operation result
      See Also:
      • MongoClient.runCommand(String, JsonObject)
    • runCommandAndForget

      public MongoClient runCommandAndForget(String commandName, io.vertx.core.json.JsonObject command)
      Run an arbitrary MongoDB command.

      Unlike the bare Vert.x variant, this method ignores the JsonObject result or any failure.

      Parameters:
      commandName - the name of the command
      command - 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 collection
      fieldName - the field name
      Returns:
      A Uni representing 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 a RuntimeException).

      Parameters:
      collection - the collection
      fieldName - the field name
      Returns:
      The operation result
      See Also:
      • MongoClient.distinct(String, String, String)
    • distinctAndForget

      public MongoClient distinctAndForget(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 ignores the JsonArray result or any failure.

      Parameters:
      collection - the collection
      fieldName - 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 collection
      fieldName - the field name
      distinctOptions - options (e.g. collation)
      Returns:
      A Uni representing 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 a RuntimeException).

      Parameters:
      collection - the collection
      fieldName - the field name
      distinctOptions - 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 JsonArray result or any failure.

      Parameters:
      collection - the collection
      fieldName - the field name
      distinctOptions - 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 collection
      fieldName - the field name
      query - the query
      Returns:
      A Uni representing 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 a RuntimeException).

      Parameters:
      collection - the collection
      fieldName - the field name
      query - 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 JsonArray result or any failure.

      Parameters:
      collection - the collection
      fieldName - the field name
      query - 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 collection
      fieldName - the field name
      query - the query
      distinctOptions - options (e.g. collation)
      Returns:
      A Uni representing 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 a RuntimeException).

      Parameters:
      collection - the collection
      fieldName - the field name
      query - the query
      distinctOptions - 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 JsonArray result or any failure.

      Parameters:
      collection - the collection
      fieldName - the field name
      query - the query
      distinctOptions - 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 a MongoGridFsClient used 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 Uni representing the asynchronous result of this operation.
      See Also:
      • MongoClient.createDefaultGridFsBucketService()
    • createDefaultGridFsBucketServiceAndAwait

      public MongoGridFsClient createDefaultGridFsBucketServiceAndAwait()
      Creates a MongoGridFsClient used 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 a RuntimeException).

      Returns:
      The operation result
      See Also:
      • MongoClient.createDefaultGridFsBucketService()
    • createDefaultGridFsBucketServiceAndForget

      public MongoClient createDefaultGridFsBucketServiceAndForget()
      Creates a MongoGridFsClient used to interact with Mongo GridFS.

      Unlike the bare Vert.x variant, this method ignores the MongoGridFsClient result 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 a MongoGridFsClient used 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 Uni representing the asynchronous result of this operation.
      See Also:
      • MongoClient.createGridFsBucketService(String)
    • createGridFsBucketServiceAndAwait

      public MongoGridFsClient createGridFsBucketServiceAndAwait(String bucketName)
      Creates a MongoGridFsClient used 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 a RuntimeException).

      Parameters:
      bucketName - the name of the GridFS bucket
      Returns:
      The operation result
      See Also:
      • MongoClient.createGridFsBucketService(String)
    • createGridFsBucketServiceAndForget

      public MongoClient createGridFsBucketServiceAndForget(String bucketName)
      Creates a MongoGridFsClient used to interact with Mongo GridFS.

      Unlike the bare Vert.x variant, this method ignores the MongoGridFsClient result 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

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> close()
      Close the client and release its resources

      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 Uni representing the asynchronous result of this operation.
      See Also:
      • MongoClient.close()
    • closeAndAwait

      public void closeAndAwait()
      Close the client and release its resources

      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 a RuntimeException).

      See Also:
      • MongoClient.close()
    • closeAndForget

      public MongoClient closeAndForget()
      Close the client and release its resources

      Unlike the bare Vert.x variant, this method ignores the Void result or any failure.

      Returns:
      The current instance to chain operations if needed.
      See Also:
      • MongoClient.close()
    • create

      public static MongoClient create(Vertx vertx, io.vertx.core.json.JsonObject config)
      Create a Mongo client which maintains its own data source.
      Parameters:
      vertx - the Vert.x instance
      config - the configuration
      Returns:
      the client
    • createShared

      public static MongoClient createShared(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 name
      Parameters:
      vertx - the Vert.x instance
      config - the configuration
      dataSourceName - the data source name
      Returns:
      the client
    • createShared

      public static MongoClient createShared(Vertx vertx, io.vertx.core.json.JsonObject config)
      Like createShared(io.vertx.mutiny.core.Vertx, JsonObject, String) but with the default data source name
      Parameters:
      vertx - the Vert.x instance
      config - 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 collection
      query - query used to match documents
      Returns:
      a ReadStream emitting 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 collection
      query - query used to match documents
      options - options to configure the find
      Returns:
      a ReadStream emitting 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 collection
      fieldName - the field name
      Returns:
      a ReadStream emitting 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 collection
      fieldName - the field name
      distinctOptions - options (e.g. collation)
      Returns:
      a ReadStream emitting 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 collection
      fieldName - the field name
      query - the query
      Returns:
      a ReadStream emitting 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 collection
      fieldName - the field name
      query - the query
      distinctOptions - options (e.g. collation)
      Returns:
      a ReadStream emitting 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 collection
      fieldName - the field name
      query - the query
      batchSize - the number of documents to load in a batch
      Returns:
      a ReadStream emitting 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 collection
      fieldName - the field name
      query - the query
      batchSize - the number of documents to load in a batch
      distinctOptions - options (e.g. collation)
      Returns:
      a ReadStream emitting json fragments
    • aggregate

      public ReadStream<io.vertx.core.json.JsonObject> aggregate(String collection, io.vertx.core.json.JsonArray pipeline)
      Run aggregate MongoDB command with default AggregateOptions.
      Parameters:
      collection - the collection
      pipeline - 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 collection
      pipeline - aggregation pipeline to be executed
      options - 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 collection
      pipeline - watching pipeline to be executed
      withUpdatedDoc - whether to get updated fullDocument for "update" operation
      batchSize - the number of documents to load in a batch
    • newInstance

      public static MongoClient newInstance(io.vertx.ext.mongo.MongoClient delegate)
      Creates a new instance of the MongoClient.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object