public class MongoClient extends Object
Some of the operations might change _id field of passed document.
NOTE: This class has been automatically generated from theoriginal
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<MongoClient> |
__TYPE_ARG |
static String |
DEFAULT_DB_NAME
The name of the default database
|
static String |
DEFAULT_POOL_NAME
The name of the default pool
|
Constructor and Description |
---|
MongoClient(MongoClient delegate) |
MongoClient(Object delegate) |
Modifier and Type | Method and Description |
---|---|
ReadStream<JsonObject> |
aggregate(String collection,
JsonArray pipeline)
Run aggregate MongoDB command with default
AggregateOptions . |
ReadStream<JsonObject> |
aggregateWithOptions(String collection,
JsonArray pipeline,
AggregateOptions options)
Run aggregate MongoDB command.
|
MongoClient |
bulkWrite(String collection,
List<BulkOperation> operations,
Handler<AsyncResult<MongoClientBulkWriteResult>> resultHandler)
Execute a bulk operation.
|
Observable<MongoClientBulkWriteResult> |
bulkWriteObservable(String collection,
List<BulkOperation> operations)
Deprecated.
|
MongoClient |
bulkWriteWithOptions(String collection,
List<BulkOperation> operations,
BulkWriteOptions bulkWriteOptions,
Handler<AsyncResult<MongoClientBulkWriteResult>> resultHandler)
Execute a bulk operation with the specified write options.
|
Observable<MongoClientBulkWriteResult> |
bulkWriteWithOptionsObservable(String collection,
List<BulkOperation> operations,
BulkWriteOptions bulkWriteOptions)
|
void |
close()
Close the client and release its resources
|
MongoClient |
count(String collection,
JsonObject query,
Handler<AsyncResult<Long>> resultHandler)
Count matching documents in a collection.
|
Observable<Long> |
countObservable(String collection,
JsonObject query)
Deprecated.
|
static MongoClient |
create(Vertx vertx,
JsonObject config)
Create a Mongo client which maintains its own data source.
|
MongoClient |
createCollection(String collectionName,
Handler<AsyncResult<Void>> resultHandler)
Create a new collection
|
Observable<Void> |
createCollectionObservable(String collectionName)
Deprecated.
use
rxCreateCollection(java.lang.String) instead |
MongoClient |
createIndex(String collection,
JsonObject key,
Handler<AsyncResult<Void>> resultHandler)
Creates an index.
|
Observable<Void> |
createIndexObservable(String collection,
JsonObject key)
Deprecated.
|
MongoClient |
createIndexWithOptions(String collection,
JsonObject key,
IndexOptions options,
Handler<AsyncResult<Void>> resultHandler)
Creates an index.
|
Observable<Void> |
createIndexWithOptionsObservable(String collection,
JsonObject key,
IndexOptions options)
|
static MongoClient |
createNonShared(Vertx vertx,
JsonObject config)
Deprecated.
|
static MongoClient |
createShared(Vertx vertx,
JsonObject config)
Like
createShared(io.vertx.rxjava.core.Vertx, io.vertx.core.json.JsonObject, java.lang.String) but with the default data source name |
static MongoClient |
createShared(Vertx vertx,
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
|
MongoClient |
distinct(String collection,
String fieldName,
String resultClassname,
Handler<AsyncResult<JsonArray>> resultHandler)
Gets the distinct values of the specified field name.
|
ReadStream<JsonObject> |
distinctBatch(String collection,
String fieldName,
String resultClassname)
Gets the distinct values of the specified field name.
|
ReadStream<JsonObject> |
distinctBatchWithQuery(String collection,
String fieldName,
String resultClassname,
JsonObject query)
Gets the distinct values of the specified field name filtered by specified query.
|
ReadStream<JsonObject> |
distinctBatchWithQuery(String collection,
String fieldName,
String resultClassname,
JsonObject query,
int batchSize)
Gets the distinct values of the specified field name filtered by specified query.
|
Observable<JsonArray> |
distinctObservable(String collection,
String fieldName,
String resultClassname)
Deprecated.
|
MongoClient |
distinctWithQuery(String collection,
String fieldName,
String resultClassname,
JsonObject query,
Handler<AsyncResult<JsonArray>> resultHandler)
Gets the distinct values of the specified field name filtered by specified query.
|
Observable<JsonArray> |
distinctWithQueryObservable(String collection,
String fieldName,
String resultClassname,
JsonObject query)
|
MongoClient |
dropCollection(String collection,
Handler<AsyncResult<Void>> resultHandler)
Drop a collection
|
Observable<Void> |
dropCollectionObservable(String collection)
Deprecated.
use
rxDropCollection(java.lang.String) instead |
MongoClient |
dropIndex(String collection,
String indexName,
Handler<AsyncResult<Void>> resultHandler)
Drops the index given its name.
|
Observable<Void> |
dropIndexObservable(String collection,
String indexName)
Deprecated.
use
rxDropIndex(java.lang.String, java.lang.String) instead |
boolean |
equals(Object o) |
MongoClient |
find(String collection,
JsonObject query,
Handler<AsyncResult<List<JsonObject>>> resultHandler)
Find matching documents in the specified collection
|
ReadStream<JsonObject> |
findBatch(String collection,
JsonObject query)
Find matching documents in the specified collection.
|
ReadStream<JsonObject> |
findBatchWithOptions(String collection,
JsonObject query,
FindOptions options)
Find matching documents in the specified collection, specifying options.
|
Observable<List<JsonObject>> |
findObservable(String collection,
JsonObject query)
Deprecated.
|
MongoClient |
findOne(String collection,
JsonObject query,
JsonObject fields,
Handler<AsyncResult<JsonObject>> resultHandler)
Find a single matching document in the specified collection
|
MongoClient |
findOneAndDelete(String collection,
JsonObject query,
Handler<AsyncResult<JsonObject>> resultHandler)
Find a single matching document in the specified collection and delete it.
|
Observable<JsonObject> |
findOneAndDeleteObservable(String collection,
JsonObject query)
Deprecated.
|
MongoClient |
findOneAndDeleteWithOptions(String collection,
JsonObject query,
FindOptions findOptions,
Handler<AsyncResult<JsonObject>> resultHandler)
Find a single matching document in the specified collection and delete it.
|
Observable<JsonObject> |
findOneAndDeleteWithOptionsObservable(String collection,
JsonObject query,
FindOptions findOptions)
|
MongoClient |
findOneAndReplace(String collection,
JsonObject query,
JsonObject replace,
Handler<AsyncResult<JsonObject>> resultHandler)
Find a single matching document in the specified collection and replace it.
|
Observable<JsonObject> |
findOneAndReplaceObservable(String collection,
JsonObject query,
JsonObject replace)
|
MongoClient |
findOneAndReplaceWithOptions(String collection,
JsonObject query,
JsonObject replace,
FindOptions findOptions,
UpdateOptions updateOptions,
Handler<AsyncResult<JsonObject>> resultHandler)
Find a single matching document in the specified collection and replace it.
|
Observable<JsonObject> |
findOneAndReplaceWithOptionsObservable(String collection,
JsonObject query,
JsonObject replace,
FindOptions findOptions,
UpdateOptions updateOptions)
|
MongoClient |
findOneAndUpdate(String collection,
JsonObject query,
JsonObject update,
Handler<AsyncResult<JsonObject>> resultHandler)
Find a single matching document in the specified collection and update it.
|
Observable<JsonObject> |
findOneAndUpdateObservable(String collection,
JsonObject query,
JsonObject update)
|
MongoClient |
findOneAndUpdateWithOptions(String collection,
JsonObject query,
JsonObject update,
FindOptions findOptions,
UpdateOptions updateOptions,
Handler<AsyncResult<JsonObject>> resultHandler)
Find a single matching document in the specified collection and update it.
|
Observable<JsonObject> |
findOneAndUpdateWithOptionsObservable(String collection,
JsonObject query,
JsonObject update,
FindOptions findOptions,
UpdateOptions updateOptions)
|
Observable<JsonObject> |
findOneObservable(String collection,
JsonObject query,
JsonObject fields)
Deprecated.
|
MongoClient |
findWithOptions(String collection,
JsonObject query,
FindOptions options,
Handler<AsyncResult<List<JsonObject>>> resultHandler)
Find matching documents in the specified collection, specifying options
|
Observable<List<JsonObject>> |
findWithOptionsObservable(String collection,
JsonObject query,
FindOptions options)
|
MongoClient |
getCollections(Handler<AsyncResult<List<String>>> resultHandler)
Get a list of all collections in the database.
|
Observable<List<String>> |
getCollectionsObservable()
Deprecated.
use
rxGetCollections() instead |
MongoClient |
getDelegate() |
int |
hashCode() |
MongoClient |
insert(String collection,
JsonObject document,
Handler<AsyncResult<String>> resultHandler)
Insert a document in the specified collection
|
Observable<String> |
insertObservable(String collection,
JsonObject document)
Deprecated.
|
MongoClient |
insertWithOptions(String collection,
JsonObject document,
WriteOption writeOption,
Handler<AsyncResult<String>> resultHandler)
Insert a document in the specified collection with the specified write option
|
Observable<String> |
insertWithOptionsObservable(String collection,
JsonObject document,
WriteOption writeOption)
|
MongoClient |
listIndexes(String collection,
Handler<AsyncResult<JsonArray>> resultHandler)
Get all the indexes in this collection.
|
Observable<JsonArray> |
listIndexesObservable(String collection)
Deprecated.
use
rxListIndexes(java.lang.String) instead |
static MongoClient |
newInstance(MongoClient arg) |
MongoClient |
remove(String collection,
JsonObject query,
Handler<AsyncResult<Void>> resultHandler)
Deprecated.
|
MongoClient |
removeDocument(String collection,
JsonObject query,
Handler<AsyncResult<MongoClientDeleteResult>> resultHandler)
Remove a single matching document from a collection and return the handler with MongoClientDeleteResult result
|
Observable<MongoClientDeleteResult> |
removeDocumentObservable(String collection,
JsonObject query)
Deprecated.
|
MongoClient |
removeDocuments(String collection,
JsonObject query,
Handler<AsyncResult<MongoClientDeleteResult>> resultHandler)
Remove matching documents from a collection and return the handler with MongoClientDeleteResult result
|
Observable<MongoClientDeleteResult> |
removeDocumentsObservable(String collection,
JsonObject query)
Deprecated.
|
MongoClient |
removeDocumentsWithOptions(String collection,
JsonObject query,
WriteOption writeOption,
Handler<AsyncResult<MongoClientDeleteResult>> resultHandler)
Remove matching documents from a collection with the specified write option and return the handler with MongoClientDeleteResult result
|
Observable<MongoClientDeleteResult> |
removeDocumentsWithOptionsObservable(String collection,
JsonObject query,
WriteOption writeOption)
|
MongoClient |
removeDocumentWithOptions(String collection,
JsonObject query,
WriteOption writeOption,
Handler<AsyncResult<MongoClientDeleteResult>> resultHandler)
Remove a single matching document from a collection with the specified write option and return the handler with MongoClientDeleteResult result
|
Observable<MongoClientDeleteResult> |
removeDocumentWithOptionsObservable(String collection,
JsonObject query,
WriteOption writeOption)
|
Observable<Void> |
removeObservable(String collection,
JsonObject query)
Deprecated.
|
MongoClient |
removeOne(String collection,
JsonObject query,
Handler<AsyncResult<Void>> resultHandler)
Deprecated.
|
Observable<Void> |
removeOneObservable(String collection,
JsonObject query)
Deprecated.
|
MongoClient |
removeOneWithOptions(String collection,
JsonObject query,
WriteOption writeOption,
Handler<AsyncResult<Void>> resultHandler)
Deprecated.
|
Observable<Void> |
removeOneWithOptionsObservable(String collection,
JsonObject query,
WriteOption writeOption)
|
MongoClient |
removeWithOptions(String collection,
JsonObject query,
WriteOption writeOption,
Handler<AsyncResult<Void>> resultHandler)
Deprecated.
|
Observable<Void> |
removeWithOptionsObservable(String collection,
JsonObject query,
WriteOption writeOption)
|
MongoClient |
replace(String collection,
JsonObject query,
JsonObject replace,
Handler<AsyncResult<Void>> resultHandler)
Deprecated.
|
MongoClient |
replaceDocuments(String collection,
JsonObject query,
JsonObject replace,
Handler<AsyncResult<MongoClientUpdateResult>> resultHandler)
Replace matching documents in the specified collection and return the handler with MongoClientUpdateResult result
|
Observable<MongoClientUpdateResult> |
replaceDocumentsObservable(String collection,
JsonObject query,
JsonObject replace)
|
MongoClient |
replaceDocumentsWithOptions(String collection,
JsonObject query,
JsonObject replace,
UpdateOptions options,
Handler<AsyncResult<MongoClientUpdateResult>> resultHandler)
Replace matching documents in the specified collection, specifying options and return the handler with MongoClientUpdateResult result
|
Observable<MongoClientUpdateResult> |
replaceDocumentsWithOptionsObservable(String collection,
JsonObject query,
JsonObject replace,
UpdateOptions options)
|
Observable<Void> |
replaceObservable(String collection,
JsonObject query,
JsonObject replace)
Deprecated.
|
MongoClient |
replaceWithOptions(String collection,
JsonObject query,
JsonObject replace,
UpdateOptions options,
Handler<AsyncResult<Void>> resultHandler)
Deprecated.
|
Observable<Void> |
replaceWithOptionsObservable(String collection,
JsonObject query,
JsonObject replace,
UpdateOptions options)
|
MongoClient |
runCommand(String commandName,
JsonObject command,
Handler<AsyncResult<JsonObject>> resultHandler)
Run an arbitrary MongoDB command.
|
Observable<JsonObject> |
runCommandObservable(String commandName,
JsonObject command)
Deprecated.
|
Single<MongoClientBulkWriteResult> |
rxBulkWrite(String collection,
List<BulkOperation> operations)
Execute a bulk operation.
|
Single<MongoClientBulkWriteResult> |
rxBulkWriteWithOptions(String collection,
List<BulkOperation> operations,
BulkWriteOptions bulkWriteOptions)
Execute a bulk operation with the specified write options.
|
Single<Long> |
rxCount(String collection,
JsonObject query)
Count matching documents in a collection.
|
Single<Void> |
rxCreateCollection(String collectionName)
Create a new collection
|
Single<Void> |
rxCreateIndex(String collection,
JsonObject key)
Creates an index.
|
Single<Void> |
rxCreateIndexWithOptions(String collection,
JsonObject key,
IndexOptions options)
Creates an index.
|
Single<JsonArray> |
rxDistinct(String collection,
String fieldName,
String resultClassname)
Gets the distinct values of the specified field name.
|
Single<JsonArray> |
rxDistinctWithQuery(String collection,
String fieldName,
String resultClassname,
JsonObject query)
Gets the distinct values of the specified field name filtered by specified query.
|
Single<Void> |
rxDropCollection(String collection)
Drop a collection
|
Single<Void> |
rxDropIndex(String collection,
String indexName)
Drops the index given its name.
|
Single<List<JsonObject>> |
rxFind(String collection,
JsonObject query)
Find matching documents in the specified collection
|
Single<JsonObject> |
rxFindOne(String collection,
JsonObject query,
JsonObject fields)
Find a single matching document in the specified collection
|
Single<JsonObject> |
rxFindOneAndDelete(String collection,
JsonObject query)
Find a single matching document in the specified collection and delete it.
|
Single<JsonObject> |
rxFindOneAndDeleteWithOptions(String collection,
JsonObject query,
FindOptions findOptions)
Find a single matching document in the specified collection and delete it.
|
Single<JsonObject> |
rxFindOneAndReplace(String collection,
JsonObject query,
JsonObject replace)
Find a single matching document in the specified collection and replace it.
|
Single<JsonObject> |
rxFindOneAndReplaceWithOptions(String collection,
JsonObject query,
JsonObject replace,
FindOptions findOptions,
UpdateOptions updateOptions)
Find a single matching document in the specified collection and replace it.
|
Single<JsonObject> |
rxFindOneAndUpdate(String collection,
JsonObject query,
JsonObject update)
Find a single matching document in the specified collection and update it.
|
Single<JsonObject> |
rxFindOneAndUpdateWithOptions(String collection,
JsonObject query,
JsonObject update,
FindOptions findOptions,
UpdateOptions updateOptions)
Find a single matching document in the specified collection and update it.
|
Single<List<JsonObject>> |
rxFindWithOptions(String collection,
JsonObject query,
FindOptions options)
Find matching documents in the specified collection, specifying options
|
Single<List<String>> |
rxGetCollections()
Get a list of all collections in the database.
|
Single<String> |
rxInsert(String collection,
JsonObject document)
Insert a document in the specified collection
|
Single<String> |
rxInsertWithOptions(String collection,
JsonObject document,
WriteOption writeOption)
Insert a document in the specified collection with the specified write option
|
Single<JsonArray> |
rxListIndexes(String collection)
Get all the indexes in this collection.
|
Single<Void> |
rxRemove(String collection,
JsonObject query)
Deprecated.
|
Single<MongoClientDeleteResult> |
rxRemoveDocument(String collection,
JsonObject query)
Remove a single matching document from a collection and return the handler with MongoClientDeleteResult result
|
Single<MongoClientDeleteResult> |
rxRemoveDocuments(String collection,
JsonObject query)
Remove matching documents from a collection and return the handler with MongoClientDeleteResult result
|
Single<MongoClientDeleteResult> |
rxRemoveDocumentsWithOptions(String collection,
JsonObject query,
WriteOption writeOption)
Remove matching documents from a collection with the specified write option and return the handler with MongoClientDeleteResult result
|
Single<MongoClientDeleteResult> |
rxRemoveDocumentWithOptions(String collection,
JsonObject query,
WriteOption writeOption)
Remove a single matching document from a collection with the specified write option and return the handler with MongoClientDeleteResult result
|
Single<Void> |
rxRemoveOne(String collection,
JsonObject query)
Deprecated.
|
Single<Void> |
rxRemoveOneWithOptions(String collection,
JsonObject query,
WriteOption writeOption)
Deprecated.
|
Single<Void> |
rxRemoveWithOptions(String collection,
JsonObject query,
WriteOption writeOption)
Deprecated.
|
Single<Void> |
rxReplace(String collection,
JsonObject query,
JsonObject replace)
Deprecated.
|
Single<MongoClientUpdateResult> |
rxReplaceDocuments(String collection,
JsonObject query,
JsonObject replace)
Replace matching documents in the specified collection and return the handler with MongoClientUpdateResult result
|
Single<MongoClientUpdateResult> |
rxReplaceDocumentsWithOptions(String collection,
JsonObject query,
JsonObject replace,
UpdateOptions options)
Replace matching documents in the specified collection, specifying options and return the handler with MongoClientUpdateResult result
|
Single<Void> |
rxReplaceWithOptions(String collection,
JsonObject query,
JsonObject replace,
UpdateOptions options)
Deprecated.
|
Single<JsonObject> |
rxRunCommand(String commandName,
JsonObject command)
Run an arbitrary MongoDB command.
|
Single<String> |
rxSave(String collection,
JsonObject document)
Save a document in the specified collection
|
Single<String> |
rxSaveWithOptions(String collection,
JsonObject document,
WriteOption writeOption)
Save a document in the specified collection with the specified write option
|
Single<Void> |
rxUpdate(String collection,
JsonObject query,
JsonObject update)
Deprecated.
|
Single<MongoClientUpdateResult> |
rxUpdateCollection(String collection,
JsonObject query,
JsonObject update)
Update matching documents in the specified collection and return the handler with MongoClientUpdateResult result
|
Single<MongoClientUpdateResult> |
rxUpdateCollectionWithOptions(String collection,
JsonObject query,
JsonObject update,
UpdateOptions options)
Update matching documents in the specified collection, specifying options and return the handler with MongoClientUpdateResult result
|
Single<Void> |
rxUpdateWithOptions(String collection,
JsonObject query,
JsonObject update,
UpdateOptions options)
Deprecated.
|
MongoClient |
save(String collection,
JsonObject document,
Handler<AsyncResult<String>> resultHandler)
Save a document in the specified collection
|
Observable<String> |
saveObservable(String collection,
JsonObject document)
Deprecated.
|
MongoClient |
saveWithOptions(String collection,
JsonObject document,
WriteOption writeOption,
Handler<AsyncResult<String>> resultHandler)
Save a document in the specified collection with the specified write option
|
Observable<String> |
saveWithOptionsObservable(String collection,
JsonObject document,
WriteOption writeOption)
|
String |
toString() |
MongoClient |
update(String collection,
JsonObject query,
JsonObject update,
Handler<AsyncResult<Void>> resultHandler)
Deprecated.
|
MongoClient |
updateCollection(String collection,
JsonObject query,
JsonObject update,
Handler<AsyncResult<MongoClientUpdateResult>> resultHandler)
Update matching documents in the specified collection and return the handler with MongoClientUpdateResult result
|
Observable<MongoClientUpdateResult> |
updateCollectionObservable(String collection,
JsonObject query,
JsonObject update)
|
MongoClient |
updateCollectionWithOptions(String collection,
JsonObject query,
JsonObject update,
UpdateOptions options,
Handler<AsyncResult<MongoClientUpdateResult>> resultHandler)
Update matching documents in the specified collection, specifying options and return the handler with MongoClientUpdateResult result
|
Observable<MongoClientUpdateResult> |
updateCollectionWithOptionsObservable(String collection,
JsonObject query,
JsonObject update,
UpdateOptions options)
|
Observable<Void> |
updateObservable(String collection,
JsonObject query,
JsonObject update)
Deprecated.
|
MongoClient |
updateWithOptions(String collection,
JsonObject query,
JsonObject update,
UpdateOptions options,
Handler<AsyncResult<Void>> resultHandler)
Deprecated.
|
Observable<Void> |
updateWithOptionsObservable(String collection,
JsonObject query,
JsonObject update,
UpdateOptions options)
|
public static final io.vertx.lang.rx.TypeArg<MongoClient> __TYPE_ARG
public static final String DEFAULT_POOL_NAME
public static final String DEFAULT_DB_NAME
public MongoClient(MongoClient delegate)
public MongoClient(Object delegate)
public MongoClient getDelegate()
@Deprecated public static MongoClient createNonShared(Vertx vertx, JsonObject config)
vertx
- config
- public static MongoClient create(Vertx vertx, JsonObject config)
vertx
- the Vert.x instanceconfig
- the configurationpublic static MongoClient createShared(Vertx vertx, JsonObject config, String dataSourceName)
vertx
- the Vert.x instanceconfig
- the configurationdataSourceName
- the data source namepublic static MongoClient createShared(Vertx vertx, JsonObject config)
createShared(io.vertx.rxjava.core.Vertx, io.vertx.core.json.JsonObject, java.lang.String)
but with the default data source namevertx
- the Vert.x instanceconfig
- the configurationpublic MongoClient save(String collection, JsonObject document, Handler<AsyncResult<String>> resultHandler)
This operation might change _id field of document parameter
collection
- the collectiondocument
- the documentresultHandler
- result handler will be provided with the id if document didn't already have one@Deprecated public Observable<String> saveObservable(String collection, JsonObject document)
rxSave(java.lang.String, io.vertx.core.json.JsonObject)
insteadThis operation might change _id field of document parameter
collection
- the collectiondocument
- the documentpublic Single<String> rxSave(String collection, JsonObject document)
This operation might change _id field of document parameter
collection
- the collectiondocument
- the documentpublic MongoClient saveWithOptions(String collection, JsonObject document, WriteOption writeOption, Handler<AsyncResult<String>> resultHandler)
This operation might change _id field of document parameter
collection
- the collectiondocument
- the documentwriteOption
- the write option to useresultHandler
- result handler will be provided with the id if document didn't already have one@Deprecated public Observable<String> saveWithOptionsObservable(String collection, JsonObject document, WriteOption writeOption)
rxSaveWithOptions(java.lang.String, io.vertx.core.json.JsonObject, io.vertx.ext.mongo.WriteOption)
insteadThis operation might change _id field of document parameter
collection
- the collectiondocument
- the documentwriteOption
- the write option to usepublic Single<String> rxSaveWithOptions(String collection, JsonObject document, WriteOption writeOption)
This operation might change _id field of document parameter
collection
- the collectiondocument
- the documentwriteOption
- the write option to usepublic MongoClient insert(String collection, JsonObject document, Handler<AsyncResult<String>> resultHandler)
This operation might change _id field of document parameter
collection
- the collectiondocument
- the documentresultHandler
- result handler will be provided with the id if document didn't already have one@Deprecated public Observable<String> insertObservable(String collection, JsonObject document)
rxInsert(java.lang.String, io.vertx.core.json.JsonObject)
insteadThis operation might change _id field of document parameter
collection
- the collectiondocument
- the documentpublic Single<String> rxInsert(String collection, JsonObject document)
This operation might change _id field of document parameter
collection
- the collectiondocument
- the documentpublic MongoClient insertWithOptions(String collection, JsonObject document, WriteOption writeOption, Handler<AsyncResult<String>> resultHandler)
This operation might change _id field of document parameter
collection
- the collectiondocument
- the documentwriteOption
- the write option to useresultHandler
- result handler will be provided with the id if document didn't already have one@Deprecated public Observable<String> insertWithOptionsObservable(String collection, JsonObject document, WriteOption writeOption)
rxInsertWithOptions(java.lang.String, io.vertx.core.json.JsonObject, io.vertx.ext.mongo.WriteOption)
insteadThis operation might change _id field of document parameter
collection
- the collectiondocument
- the documentwriteOption
- the write option to usepublic Single<String> rxInsertWithOptions(String collection, JsonObject document, WriteOption writeOption)
This operation might change _id field of document parameter
collection
- the collectiondocument
- the documentwriteOption
- the write option to use@Deprecated public MongoClient update(String collection, JsonObject query, JsonObject update, Handler<AsyncResult<Void>> resultHandler)
collection
- the collectionquery
- query used to match the documentsupdate
- used to describe how the documents will be updatedresultHandler
- will be called when complete@Deprecated public Observable<Void> updateObservable(String collection, JsonObject query, JsonObject update)
rxUpdate(java.lang.String, io.vertx.core.json.JsonObject, io.vertx.core.json.JsonObject)
insteadcollection
- the collectionquery
- query used to match the documentsupdate
- used to describe how the documents will be updated@Deprecated public Single<Void> rxUpdate(String collection, JsonObject query, JsonObject update)
collection
- the collectionquery
- query used to match the documentsupdate
- used to describe how the documents will be updatedpublic MongoClient updateCollection(String collection, JsonObject query, JsonObject update, Handler<AsyncResult<MongoClientUpdateResult>> resultHandler)
collection
- the collectionquery
- query used to match the documentsupdate
- used to describe how the documents will be updatedresultHandler
- will be called when complete@Deprecated public Observable<MongoClientUpdateResult> updateCollectionObservable(String collection, JsonObject query, JsonObject update)
rxUpdateCollection(java.lang.String, io.vertx.core.json.JsonObject, io.vertx.core.json.JsonObject)
insteadcollection
- the collectionquery
- query used to match the documentsupdate
- used to describe how the documents will be updatedpublic Single<MongoClientUpdateResult> rxUpdateCollection(String collection, JsonObject query, JsonObject update)
collection
- the collectionquery
- query used to match the documentsupdate
- used to describe how the documents will be updated@Deprecated public MongoClient updateWithOptions(String collection, JsonObject query, JsonObject update, UpdateOptions options, Handler<AsyncResult<Void>> resultHandler)
collection
- the collectionquery
- query used to match the documentsupdate
- used to describe how the documents will be updatedoptions
- options to configure the updateresultHandler
- will be called when complete@Deprecated public Observable<Void> updateWithOptionsObservable(String collection, JsonObject query, JsonObject update, UpdateOptions options)
rxUpdateWithOptions(java.lang.String, io.vertx.core.json.JsonObject, io.vertx.core.json.JsonObject, io.vertx.ext.mongo.UpdateOptions)
insteadcollection
- the collectionquery
- query used to match the documentsupdate
- used to describe how the documents will be updatedoptions
- options to configure the update@Deprecated public Single<Void> rxUpdateWithOptions(String collection, JsonObject query, JsonObject update, UpdateOptions options)
collection
- the collectionquery
- query used to match the documentsupdate
- used to describe how the documents will be updatedoptions
- options to configure the updatepublic MongoClient updateCollectionWithOptions(String collection, JsonObject query, JsonObject update, UpdateOptions options, Handler<AsyncResult<MongoClientUpdateResult>> resultHandler)
collection
- the collectionquery
- query used to match the documentsupdate
- used to describe how the documents will be updatedoptions
- options to configure the updateresultHandler
- will be called when complete@Deprecated public Observable<MongoClientUpdateResult> updateCollectionWithOptionsObservable(String collection, JsonObject query, JsonObject update, UpdateOptions options)
rxUpdateCollectionWithOptions(java.lang.String, io.vertx.core.json.JsonObject, io.vertx.core.json.JsonObject, io.vertx.ext.mongo.UpdateOptions)
insteadcollection
- the collectionquery
- query used to match the documentsupdate
- used to describe how the documents will be updatedoptions
- options to configure the updatepublic Single<MongoClientUpdateResult> rxUpdateCollectionWithOptions(String collection, JsonObject query, JsonObject update, UpdateOptions options)
collection
- the collectionquery
- query used to match the documentsupdate
- used to describe how the documents will be updatedoptions
- options to configure the update@Deprecated public MongoClient replace(String collection, JsonObject query, JsonObject replace, Handler<AsyncResult<Void>> resultHandler)
This operation might change _id field of replace parameter
collection
- the collectionquery
- query used to match the documentsreplace
- all matching documents will be replaced with thisresultHandler
- will be called when complete@Deprecated public Observable<Void> replaceObservable(String collection, JsonObject query, JsonObject replace)
rxReplace(java.lang.String, io.vertx.core.json.JsonObject, io.vertx.core.json.JsonObject)
insteadThis operation might change _id field of replace parameter
collection
- the collectionquery
- query used to match the documentsreplace
- all matching documents will be replaced with this@Deprecated public Single<Void> rxReplace(String collection, JsonObject query, JsonObject replace)
This operation might change _id field of replace parameter
collection
- the collectionquery
- query used to match the documentsreplace
- all matching documents will be replaced with thispublic MongoClient replaceDocuments(String collection, JsonObject query, JsonObject replace, Handler<AsyncResult<MongoClientUpdateResult>> resultHandler)
collection
- the collectionquery
- query used to match the documentsreplace
- all matching documents will be replaced with thisresultHandler
- will be called when complete@Deprecated public Observable<MongoClientUpdateResult> replaceDocumentsObservable(String collection, JsonObject query, JsonObject replace)
rxReplaceDocuments(java.lang.String, io.vertx.core.json.JsonObject, io.vertx.core.json.JsonObject)
insteadcollection
- the collectionquery
- query used to match the documentsreplace
- all matching documents will be replaced with thispublic Single<MongoClientUpdateResult> rxReplaceDocuments(String collection, JsonObject query, JsonObject replace)
collection
- the collectionquery
- query used to match the documentsreplace
- all matching documents will be replaced with this@Deprecated public MongoClient replaceWithOptions(String collection, JsonObject query, JsonObject replace, UpdateOptions options, Handler<AsyncResult<Void>> resultHandler)
This operation might change _id field of replace parameter
collection
- the collectionquery
- query used to match the documentsreplace
- all matching documents will be replaced with thisoptions
- options to configure the replaceresultHandler
- will be called when complete@Deprecated public Observable<Void> replaceWithOptionsObservable(String collection, JsonObject query, JsonObject replace, UpdateOptions options)
rxReplaceWithOptions(java.lang.String, io.vertx.core.json.JsonObject, io.vertx.core.json.JsonObject, io.vertx.ext.mongo.UpdateOptions)
insteadThis operation might change _id field of replace parameter
collection
- the collectionquery
- query used to match the documentsreplace
- all matching documents will be replaced with thisoptions
- options to configure the replace@Deprecated public Single<Void> rxReplaceWithOptions(String collection, JsonObject query, JsonObject replace, UpdateOptions options)
This operation might change _id field of replace parameter
collection
- the collectionquery
- query used to match the documentsreplace
- all matching documents will be replaced with thisoptions
- options to configure the replacepublic MongoClient replaceDocumentsWithOptions(String collection, JsonObject query, JsonObject replace, UpdateOptions options, Handler<AsyncResult<MongoClientUpdateResult>> resultHandler)
collection
- the collectionquery
- query used to match the documentsreplace
- all matching documents will be replaced with thisoptions
- options to configure the replaceresultHandler
- will be called when complete@Deprecated public Observable<MongoClientUpdateResult> replaceDocumentsWithOptionsObservable(String collection, JsonObject query, JsonObject replace, UpdateOptions options)
rxReplaceDocumentsWithOptions(java.lang.String, io.vertx.core.json.JsonObject, io.vertx.core.json.JsonObject, io.vertx.ext.mongo.UpdateOptions)
insteadcollection
- the collectionquery
- query used to match the documentsreplace
- all matching documents will be replaced with thisoptions
- options to configure the replacepublic Single<MongoClientUpdateResult> rxReplaceDocumentsWithOptions(String collection, JsonObject query, JsonObject replace, UpdateOptions options)
collection
- the collectionquery
- query used to match the documentsreplace
- all matching documents will be replaced with thisoptions
- options to configure the replacepublic MongoClient bulkWrite(String collection, List<BulkOperation> operations, Handler<AsyncResult<MongoClientBulkWriteResult>> resultHandler)
collection
- the collectionoperations
- the operations to executeresultHandler
- will be called with a MongoClientBulkWriteResult
when complete@Deprecated public Observable<MongoClientBulkWriteResult> bulkWriteObservable(String collection, List<BulkOperation> operations)
rxBulkWrite(java.lang.String, java.util.List<io.vertx.ext.mongo.BulkOperation>)
insteadcollection
- the collectionoperations
- the operations to executepublic Single<MongoClientBulkWriteResult> rxBulkWrite(String collection, List<BulkOperation> operations)
collection
- the collectionoperations
- the operations to executepublic MongoClient bulkWriteWithOptions(String collection, List<BulkOperation> operations, BulkWriteOptions bulkWriteOptions, Handler<AsyncResult<MongoClientBulkWriteResult>> resultHandler)
collection
- the collectionoperations
- the operations to executebulkWriteOptions
- the write optionsresultHandler
- will be called with a MongoClientBulkWriteResult
when complete@Deprecated public Observable<MongoClientBulkWriteResult> bulkWriteWithOptionsObservable(String collection, List<BulkOperation> operations, BulkWriteOptions bulkWriteOptions)
rxBulkWriteWithOptions(java.lang.String, java.util.List<io.vertx.ext.mongo.BulkOperation>, io.vertx.ext.mongo.BulkWriteOptions)
insteadcollection
- the collectionoperations
- the operations to executebulkWriteOptions
- the write optionspublic Single<MongoClientBulkWriteResult> rxBulkWriteWithOptions(String collection, List<BulkOperation> operations, BulkWriteOptions bulkWriteOptions)
collection
- the collectionoperations
- the operations to executebulkWriteOptions
- the write optionspublic MongoClient find(String collection, JsonObject query, Handler<AsyncResult<List<JsonObject>>> resultHandler)
collection
- the collectionquery
- query used to match documentsresultHandler
- will be provided with list of documents@Deprecated public Observable<List<JsonObject>> findObservable(String collection, JsonObject query)
rxFind(java.lang.String, io.vertx.core.json.JsonObject)
insteadcollection
- the collectionquery
- query used to match documentspublic Single<List<JsonObject>> rxFind(String collection, JsonObject query)
collection
- the collectionquery
- query used to match documentspublic ReadStream<JsonObject> findBatch(String collection, JsonObject query)
collection
- the collectionquery
- query used to match documentspublic MongoClient findWithOptions(String collection, JsonObject query, FindOptions options, Handler<AsyncResult<List<JsonObject>>> resultHandler)
collection
- the collectionquery
- query used to match documentsoptions
- options to configure the findresultHandler
- will be provided with list of documents@Deprecated public Observable<List<JsonObject>> findWithOptionsObservable(String collection, JsonObject query, FindOptions options)
rxFindWithOptions(java.lang.String, io.vertx.core.json.JsonObject, io.vertx.ext.mongo.FindOptions)
insteadcollection
- the collectionquery
- query used to match documentsoptions
- options to configure the findpublic Single<List<JsonObject>> rxFindWithOptions(String collection, JsonObject query, FindOptions options)
collection
- the collectionquery
- query used to match documentsoptions
- options to configure the findpublic ReadStream<JsonObject> findBatchWithOptions(String collection, JsonObject query, FindOptions options)
collection
- the collectionquery
- query used to match documentsoptions
- options to configure the findpublic MongoClient findOne(String collection, JsonObject query, JsonObject fields, Handler<AsyncResult<JsonObject>> resultHandler)
This operation might change _id field of query parameter
collection
- the collectionquery
- the query used to match the documentfields
- the fieldsresultHandler
- will be provided with the document, if any@Deprecated public Observable<JsonObject> findOneObservable(String collection, JsonObject query, JsonObject fields)
rxFindOne(java.lang.String, io.vertx.core.json.JsonObject, io.vertx.core.json.JsonObject)
insteadThis operation might change _id field of query parameter
collection
- the collectionquery
- the query used to match the documentfields
- the fieldspublic Single<JsonObject> rxFindOne(String collection, JsonObject query, JsonObject fields)
This operation might change _id field of query parameter
collection
- the collectionquery
- the query used to match the documentfields
- the fieldspublic MongoClient findOneAndUpdate(String collection, JsonObject query, JsonObject update, Handler<AsyncResult<JsonObject>> resultHandler)
This operation might change _id field of query parameter
collection
- the collectionquery
- the query used to match the documentupdate
- used to describe how the documents will be updatedresultHandler
- will be provided with the document, if any@Deprecated public Observable<JsonObject> findOneAndUpdateObservable(String collection, JsonObject query, JsonObject update)
rxFindOneAndUpdate(java.lang.String, io.vertx.core.json.JsonObject, io.vertx.core.json.JsonObject)
insteadThis operation might change _id field of query parameter
collection
- the collectionquery
- the query used to match the documentupdate
- used to describe how the documents will be updatedpublic Single<JsonObject> rxFindOneAndUpdate(String collection, JsonObject query, JsonObject update)
This operation might change _id field of query parameter
collection
- the collectionquery
- the query used to match the documentupdate
- used to describe how the documents will be updatedpublic MongoClient findOneAndUpdateWithOptions(String collection, JsonObject query, JsonObject update, FindOptions findOptions, UpdateOptions updateOptions, Handler<AsyncResult<JsonObject>> resultHandler)
This operation might change _id field of query parameter
collection
- the collectionquery
- the query used to match the documentupdate
- used to describe how the documents will be updatedfindOptions
- options to configure the findupdateOptions
- options to configure the updateresultHandler
- will be provided with the document, if any@Deprecated public Observable<JsonObject> findOneAndUpdateWithOptionsObservable(String collection, JsonObject query, JsonObject update, FindOptions findOptions, UpdateOptions updateOptions)
rxFindOneAndUpdateWithOptions(java.lang.String, io.vertx.core.json.JsonObject, io.vertx.core.json.JsonObject, io.vertx.ext.mongo.FindOptions, io.vertx.ext.mongo.UpdateOptions)
insteadThis operation might change _id field of query parameter
collection
- the collectionquery
- the query used to match the documentupdate
- used to describe how the documents will be updatedfindOptions
- options to configure the findupdateOptions
- options to configure the updatepublic Single<JsonObject> rxFindOneAndUpdateWithOptions(String collection, JsonObject query, JsonObject update, FindOptions findOptions, UpdateOptions updateOptions)
This operation might change _id field of query parameter
collection
- the collectionquery
- the query used to match the documentupdate
- used to describe how the documents will be updatedfindOptions
- options to configure the findupdateOptions
- options to configure the updatepublic MongoClient findOneAndReplace(String collection, JsonObject query, JsonObject replace, Handler<AsyncResult<JsonObject>> resultHandler)
This operation might change _id field of query parameter
collection
- the collectionquery
- the query used to match the documentreplace
- the replacement documentresultHandler
- will be provided with the document, if any@Deprecated public Observable<JsonObject> findOneAndReplaceObservable(String collection, JsonObject query, JsonObject replace)
rxFindOneAndReplace(java.lang.String, io.vertx.core.json.JsonObject, io.vertx.core.json.JsonObject)
insteadThis operation might change _id field of query parameter
collection
- the collectionquery
- the query used to match the documentreplace
- the replacement documentpublic Single<JsonObject> rxFindOneAndReplace(String collection, JsonObject query, JsonObject replace)
This operation might change _id field of query parameter
collection
- the collectionquery
- the query used to match the documentreplace
- the replacement documentpublic MongoClient findOneAndReplaceWithOptions(String collection, JsonObject query, JsonObject replace, FindOptions findOptions, UpdateOptions updateOptions, Handler<AsyncResult<JsonObject>> resultHandler)
This operation might change _id field of query parameter
collection
- the collectionquery
- the query used to match the documentreplace
- the replacement documentfindOptions
- options to configure the findupdateOptions
- options to configure the updateresultHandler
- will be provided with the document, if any@Deprecated public Observable<JsonObject> findOneAndReplaceWithOptionsObservable(String collection, JsonObject query, JsonObject replace, FindOptions findOptions, UpdateOptions updateOptions)
rxFindOneAndReplaceWithOptions(java.lang.String, io.vertx.core.json.JsonObject, io.vertx.core.json.JsonObject, io.vertx.ext.mongo.FindOptions, io.vertx.ext.mongo.UpdateOptions)
insteadThis operation might change _id field of query parameter
collection
- the collectionquery
- the query used to match the documentreplace
- the replacement documentfindOptions
- options to configure the findupdateOptions
- options to configure the updatepublic Single<JsonObject> rxFindOneAndReplaceWithOptions(String collection, JsonObject query, JsonObject replace, FindOptions findOptions, UpdateOptions updateOptions)
This operation might change _id field of query parameter
collection
- the collectionquery
- the query used to match the documentreplace
- the replacement documentfindOptions
- options to configure the findupdateOptions
- options to configure the updatepublic MongoClient findOneAndDelete(String collection, JsonObject query, Handler<AsyncResult<JsonObject>> resultHandler)
This operation might change _id field of query parameter
collection
- the collectionquery
- the query used to match the documentresultHandler
- will be provided with the deleted document, if any@Deprecated public Observable<JsonObject> findOneAndDeleteObservable(String collection, JsonObject query)
rxFindOneAndDelete(java.lang.String, io.vertx.core.json.JsonObject)
insteadThis operation might change _id field of query parameter
collection
- the collectionquery
- the query used to match the documentpublic Single<JsonObject> rxFindOneAndDelete(String collection, JsonObject query)
This operation might change _id field of query parameter
collection
- the collectionquery
- the query used to match the documentpublic MongoClient findOneAndDeleteWithOptions(String collection, JsonObject query, FindOptions findOptions, Handler<AsyncResult<JsonObject>> resultHandler)
This operation might change _id field of query parameter
collection
- the collectionquery
- the query used to match the documentfindOptions
- options to configure the findresultHandler
- will be provided with the deleted document, if any@Deprecated public Observable<JsonObject> findOneAndDeleteWithOptionsObservable(String collection, JsonObject query, FindOptions findOptions)
rxFindOneAndDeleteWithOptions(java.lang.String, io.vertx.core.json.JsonObject, io.vertx.ext.mongo.FindOptions)
insteadThis operation might change _id field of query parameter
collection
- the collectionquery
- the query used to match the documentfindOptions
- options to configure the findpublic Single<JsonObject> rxFindOneAndDeleteWithOptions(String collection, JsonObject query, FindOptions findOptions)
This operation might change _id field of query parameter
collection
- the collectionquery
- the query used to match the documentfindOptions
- options to configure the findpublic MongoClient count(String collection, JsonObject query, Handler<AsyncResult<Long>> resultHandler)
collection
- the collectionquery
- query used to match documentsresultHandler
- will be provided with the number of matching documents@Deprecated public Observable<Long> countObservable(String collection, JsonObject query)
rxCount(java.lang.String, io.vertx.core.json.JsonObject)
insteadcollection
- the collectionquery
- query used to match documentspublic Single<Long> rxCount(String collection, JsonObject query)
collection
- the collectionquery
- query used to match documents@Deprecated public MongoClient remove(String collection, JsonObject query, Handler<AsyncResult<Void>> resultHandler)
collection
- the collectionquery
- query used to match documentsresultHandler
- will be called when complete@Deprecated public Observable<Void> removeObservable(String collection, JsonObject query)
rxRemove(java.lang.String, io.vertx.core.json.JsonObject)
insteadcollection
- the collectionquery
- query used to match documents@Deprecated public Single<Void> rxRemove(String collection, JsonObject query)
collection
- the collectionquery
- query used to match documentspublic MongoClient removeDocuments(String collection, JsonObject query, Handler<AsyncResult<MongoClientDeleteResult>> resultHandler)
collection
- the collectionquery
- query used to match documentsresultHandler
- will be called when complete@Deprecated public Observable<MongoClientDeleteResult> removeDocumentsObservable(String collection, JsonObject query)
rxRemoveDocuments(java.lang.String, io.vertx.core.json.JsonObject)
insteadcollection
- the collectionquery
- query used to match documentspublic Single<MongoClientDeleteResult> rxRemoveDocuments(String collection, JsonObject query)
collection
- the collectionquery
- query used to match documents@Deprecated public MongoClient removeWithOptions(String collection, JsonObject query, WriteOption writeOption, Handler<AsyncResult<Void>> resultHandler)
collection
- the collectionquery
- query used to match documentswriteOption
- the write option to useresultHandler
- will be called when complete@Deprecated public Observable<Void> removeWithOptionsObservable(String collection, JsonObject query, WriteOption writeOption)
rxRemoveWithOptions(java.lang.String, io.vertx.core.json.JsonObject, io.vertx.ext.mongo.WriteOption)
insteadcollection
- the collectionquery
- query used to match documentswriteOption
- the write option to use@Deprecated public Single<Void> rxRemoveWithOptions(String collection, JsonObject query, WriteOption writeOption)
collection
- the collectionquery
- query used to match documentswriteOption
- the write option to usepublic MongoClient removeDocumentsWithOptions(String collection, JsonObject query, WriteOption writeOption, Handler<AsyncResult<MongoClientDeleteResult>> resultHandler)
collection
- the collectionquery
- query used to match documentswriteOption
- the write option to useresultHandler
- will be called when complete@Deprecated public Observable<MongoClientDeleteResult> removeDocumentsWithOptionsObservable(String collection, JsonObject query, WriteOption writeOption)
rxRemoveDocumentsWithOptions(java.lang.String, io.vertx.core.json.JsonObject, io.vertx.ext.mongo.WriteOption)
insteadcollection
- the collectionquery
- query used to match documentswriteOption
- the write option to usepublic Single<MongoClientDeleteResult> rxRemoveDocumentsWithOptions(String collection, JsonObject query, WriteOption writeOption)
collection
- the collectionquery
- query used to match documentswriteOption
- the write option to use@Deprecated public MongoClient removeOne(String collection, JsonObject query, Handler<AsyncResult<Void>> resultHandler)
collection
- the collectionquery
- query used to match documentresultHandler
- will be called when complete@Deprecated public Observable<Void> removeOneObservable(String collection, JsonObject query)
rxRemoveOne(java.lang.String, io.vertx.core.json.JsonObject)
insteadcollection
- the collectionquery
- query used to match document@Deprecated public Single<Void> rxRemoveOne(String collection, JsonObject query)
collection
- the collectionquery
- query used to match documentpublic MongoClient removeDocument(String collection, JsonObject query, Handler<AsyncResult<MongoClientDeleteResult>> resultHandler)
collection
- the collectionquery
- query used to match documentresultHandler
- will be called when complete@Deprecated public Observable<MongoClientDeleteResult> removeDocumentObservable(String collection, JsonObject query)
rxRemoveDocument(java.lang.String, io.vertx.core.json.JsonObject)
insteadcollection
- the collectionquery
- query used to match documentpublic Single<MongoClientDeleteResult> rxRemoveDocument(String collection, JsonObject query)
collection
- the collectionquery
- query used to match document@Deprecated public MongoClient removeOneWithOptions(String collection, JsonObject query, WriteOption writeOption, Handler<AsyncResult<Void>> resultHandler)
collection
- the collectionquery
- query used to match documentwriteOption
- the write option to useresultHandler
- will be called when complete@Deprecated public Observable<Void> removeOneWithOptionsObservable(String collection, JsonObject query, WriteOption writeOption)
rxRemoveOneWithOptions(java.lang.String, io.vertx.core.json.JsonObject, io.vertx.ext.mongo.WriteOption)
insteadcollection
- the collectionquery
- query used to match documentwriteOption
- the write option to use@Deprecated public Single<Void> rxRemoveOneWithOptions(String collection, JsonObject query, WriteOption writeOption)
collection
- the collectionquery
- query used to match documentwriteOption
- the write option to usepublic MongoClient removeDocumentWithOptions(String collection, JsonObject query, WriteOption writeOption, Handler<AsyncResult<MongoClientDeleteResult>> resultHandler)
collection
- the collectionquery
- query used to match documentwriteOption
- the write option to useresultHandler
- will be called when complete@Deprecated public Observable<MongoClientDeleteResult> removeDocumentWithOptionsObservable(String collection, JsonObject query, WriteOption writeOption)
rxRemoveDocumentWithOptions(java.lang.String, io.vertx.core.json.JsonObject, io.vertx.ext.mongo.WriteOption)
insteadcollection
- the collectionquery
- query used to match documentwriteOption
- the write option to usepublic Single<MongoClientDeleteResult> rxRemoveDocumentWithOptions(String collection, JsonObject query, WriteOption writeOption)
collection
- the collectionquery
- query used to match documentwriteOption
- the write option to usepublic MongoClient createCollection(String collectionName, Handler<AsyncResult<Void>> resultHandler)
collectionName
- the name of the collectionresultHandler
- will be called when complete@Deprecated public Observable<Void> createCollectionObservable(String collectionName)
rxCreateCollection(java.lang.String)
insteadcollectionName
- the name of the collectionpublic Single<Void> rxCreateCollection(String collectionName)
collectionName
- the name of the collectionpublic MongoClient getCollections(Handler<AsyncResult<List<String>>> resultHandler)
resultHandler
- will be called with a list of collections.@Deprecated public Observable<List<String>> getCollectionsObservable()
rxGetCollections()
insteadpublic Single<List<String>> rxGetCollections()
public MongoClient dropCollection(String collection, Handler<AsyncResult<Void>> resultHandler)
collection
- the collectionresultHandler
- will be called when complete@Deprecated public Observable<Void> dropCollectionObservable(String collection)
rxDropCollection(java.lang.String)
insteadcollection
- the collectionpublic Single<Void> rxDropCollection(String collection)
collection
- the collectionpublic MongoClient createIndex(String collection, JsonObject key, Handler<AsyncResult<Void>> resultHandler)
collection
- the collectionkey
- A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.resultHandler
- will be called when complete@Deprecated public Observable<Void> createIndexObservable(String collection, JsonObject key)
rxCreateIndex(java.lang.String, io.vertx.core.json.JsonObject)
insteadcollection
- the collectionkey
- A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.public Single<Void> rxCreateIndex(String collection, JsonObject key)
collection
- the collectionkey
- A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.public MongoClient createIndexWithOptions(String collection, JsonObject key, IndexOptions options, Handler<AsyncResult<Void>> resultHandler)
collection
- the collectionkey
- A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.options
- the options for the indexresultHandler
- will be called when complete@Deprecated public Observable<Void> createIndexWithOptionsObservable(String collection, JsonObject key, IndexOptions options)
rxCreateIndexWithOptions(java.lang.String, io.vertx.core.json.JsonObject, io.vertx.ext.mongo.IndexOptions)
insteadcollection
- the collectionkey
- A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.options
- the options for the indexpublic Single<Void> rxCreateIndexWithOptions(String collection, JsonObject key, IndexOptions options)
collection
- the collectionkey
- A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.options
- the options for the indexpublic MongoClient listIndexes(String collection, Handler<AsyncResult<JsonArray>> resultHandler)
collection
- the collectionresultHandler
- will be called when complete@Deprecated public Observable<JsonArray> listIndexesObservable(String collection)
rxListIndexes(java.lang.String)
insteadcollection
- the collectionpublic Single<JsonArray> rxListIndexes(String collection)
collection
- the collectionpublic MongoClient dropIndex(String collection, String indexName, Handler<AsyncResult<Void>> resultHandler)
collection
- the collectionindexName
- the name of the index to removeresultHandler
- will be called when complete@Deprecated public Observable<Void> dropIndexObservable(String collection, String indexName)
rxDropIndex(java.lang.String, java.lang.String)
insteadcollection
- the collectionindexName
- the name of the index to removepublic Single<Void> rxDropIndex(String collection, String indexName)
collection
- the collectionindexName
- the name of the index to removepublic MongoClient runCommand(String commandName, JsonObject command, Handler<AsyncResult<JsonObject>> resultHandler)
commandName
- the name of the commandcommand
- the commandresultHandler
- will be called with the result.@Deprecated public Observable<JsonObject> runCommandObservable(String commandName, JsonObject command)
rxRunCommand(java.lang.String, io.vertx.core.json.JsonObject)
insteadcommandName
- the name of the commandcommand
- the commandpublic Single<JsonObject> rxRunCommand(String commandName, JsonObject command)
commandName
- the name of the commandcommand
- the commandpublic MongoClient distinct(String collection, String fieldName, String resultClassname, Handler<AsyncResult<JsonArray>> resultHandler)
collection
- the collectionfieldName
- the field nameresultClassname
- resultHandler
- will be provided with array of values.@Deprecated public Observable<JsonArray> distinctObservable(String collection, String fieldName, String resultClassname)
rxDistinct(java.lang.String, java.lang.String, java.lang.String)
insteadcollection
- the collectionfieldName
- the field nameresultClassname
- public Single<JsonArray> rxDistinct(String collection, String fieldName, String resultClassname)
collection
- the collectionfieldName
- the field nameresultClassname
- public MongoClient distinctWithQuery(String collection, String fieldName, String resultClassname, JsonObject query, Handler<AsyncResult<JsonArray>> resultHandler)
collection
- the collectionfieldName
- the field nameresultClassname
- query
- the queryresultHandler
- will be provided with array of values.@Deprecated public Observable<JsonArray> distinctWithQueryObservable(String collection, String fieldName, String resultClassname, JsonObject query)
rxDistinctWithQuery(java.lang.String, java.lang.String, java.lang.String, io.vertx.core.json.JsonObject)
insteadcollection
- the collectionfieldName
- the field nameresultClassname
- query
- the querypublic Single<JsonArray> rxDistinctWithQuery(String collection, String fieldName, String resultClassname, JsonObject query)
collection
- the collectionfieldName
- the field nameresultClassname
- query
- the querypublic ReadStream<JsonObject> distinctBatch(String collection, String fieldName, String resultClassname)
collection
- the collectionfieldName
- the field nameresultClassname
- public ReadStream<JsonObject> distinctBatchWithQuery(String collection, String fieldName, String resultClassname, JsonObject query)
collection
- the collectionfieldName
- the field nameresultClassname
- query
- the querypublic ReadStream<JsonObject> distinctBatchWithQuery(String collection, String fieldName, String resultClassname, JsonObject query, int batchSize)
collection
- the collectionfieldName
- the field nameresultClassname
- query
- the querybatchSize
- the number of documents to load in a batchpublic ReadStream<JsonObject> aggregate(String collection, JsonArray pipeline)
AggregateOptions
.collection
- the collectionpipeline
- aggregation pipeline to be executedpublic ReadStream<JsonObject> aggregateWithOptions(String collection, JsonArray pipeline, AggregateOptions options)
collection
- the collectionpipeline
- aggregation pipeline to be executedoptions
- options to configure the aggregation commandpublic void close()
public static MongoClient newInstance(MongoClient arg)
Copyright © 2023 Eclipse. All rights reserved.