public class MongoService extends MongoClient
original
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<MongoService> |
__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 |
---|
MongoService(MongoService delegate) |
MongoService(Object delegate) |
Modifier and Type | Method and Description |
---|---|
MongoService |
bulkWrite(String collection,
List<BulkOperation> operations,
Handler<AsyncResult<MongoClientBulkWriteResult>> resultHandler)
Execute a bulk operation.
|
MongoService |
bulkWriteWithOptions(String collection,
List<BulkOperation> operations,
BulkWriteOptions bulkWriteOptions,
Handler<AsyncResult<MongoClientBulkWriteResult>> resultHandler)
Execute a bulk operation with the specified write options.
|
void |
close()
Close the client and release its resources
|
MongoService |
count(String collection,
JsonObject query,
Handler<AsyncResult<Long>> resultHandler)
Count matching documents in a collection.
|
MongoService |
createCollection(String collectionName,
Handler<AsyncResult<Void>> resultHandler)
Create a new collection
|
static MongoService |
createEventBusProxy(Vertx vertx,
String address)
Create a proxy to a service that is deployed somewhere on the event bus
|
MongoService |
createIndex(String collection,
JsonObject key,
Handler<AsyncResult<Void>> resultHandler)
Creates an index.
|
MongoService |
createIndexWithOptions(String collection,
JsonObject key,
IndexOptions options,
Handler<AsyncResult<Void>> resultHandler)
Creates an index.
|
MongoService |
distinct(String collection,
String fieldName,
String resultClassname,
Handler<AsyncResult<JsonArray>> resultHandler)
Gets the distinct values of the specified field name.
|
MongoService |
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.
|
MongoService |
dropCollection(String collection,
Handler<AsyncResult<Void>> resultHandler)
Drop a collection
|
MongoService |
dropIndex(String collection,
String indexName,
Handler<AsyncResult<Void>> resultHandler)
Drops the index given its name.
|
boolean |
equals(Object o) |
MongoService |
find(String collection,
JsonObject query,
Handler<AsyncResult<List<JsonObject>>> resultHandler)
Find matching documents in the specified collection
|
MongoService |
findOne(String collection,
JsonObject query,
JsonObject fields,
Handler<AsyncResult<JsonObject>> resultHandler)
Find a single matching document in the specified collection
|
MongoService |
findOneAndDelete(String collection,
JsonObject query,
Handler<AsyncResult<JsonObject>> resultHandler)
Find a single matching document in the specified collection and delete it.
|
MongoService |
findOneAndDeleteWithOptions(String collection,
JsonObject query,
FindOptions findOptions,
Handler<AsyncResult<JsonObject>> resultHandler)
Find a single matching document in the specified collection and delete it.
|
MongoService |
findOneAndReplace(String collection,
JsonObject query,
JsonObject replace,
Handler<AsyncResult<JsonObject>> resultHandler)
Find a single matching document in the specified collection and replace it.
|
MongoService |
findOneAndReplaceWithOptions(String collection,
JsonObject query,
JsonObject update,
FindOptions findOptions,
UpdateOptions updateOptions,
Handler<AsyncResult<JsonObject>> resultHandler)
Find a single matching document in the specified collection and replace it.
|
MongoService |
findOneAndUpdate(String collection,
JsonObject query,
JsonObject update,
Handler<AsyncResult<JsonObject>> resultHandler)
Find a single matching document in the specified collection and update it.
|
MongoService |
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.
|
MongoService |
findWithOptions(String collection,
JsonObject query,
FindOptions options,
Handler<AsyncResult<List<JsonObject>>> resultHandler)
Find matching documents in the specified collection, specifying options
|
MongoService |
getCollections(Handler<AsyncResult<List<String>>> resultHandler)
Get a list of all collections in the database.
|
MongoService |
getDelegate() |
int |
hashCode() |
MongoService |
insert(String collection,
JsonObject document,
Handler<AsyncResult<String>> resultHandler)
Insert a document in the specified collection
|
MongoService |
insertWithOptions(String collection,
JsonObject document,
WriteOption writeOption,
Handler<AsyncResult<String>> resultHandler)
Insert a document in the specified collection with the specified write option
|
MongoService |
listIndexes(String collection,
Handler<AsyncResult<JsonArray>> resultHandler)
Get all the indexes in this collection.
|
static MongoService |
newInstance(MongoService arg) |
MongoService |
remove(String collection,
JsonObject query,
Handler<AsyncResult<Void>> resultHandler)
Deprecated.
|
MongoService |
removeDocument(String collection,
JsonObject query,
Handler<AsyncResult<MongoClientDeleteResult>> resultHandler)
Remove a single matching document from a collection and return the handler with MongoClientDeleteResult result
|
MongoService |
removeDocuments(String collection,
JsonObject query,
Handler<AsyncResult<MongoClientDeleteResult>> resultHandler)
Remove matching documents from a collection and return the handler with MongoClientDeleteResult result
|
MongoService |
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
|
MongoService |
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
|
MongoService |
removeOne(String collection,
JsonObject query,
Handler<AsyncResult<Void>> resultHandler)
Deprecated.
|
MongoService |
removeOneWithOptions(String collection,
JsonObject query,
WriteOption writeOption,
Handler<AsyncResult<Void>> resultHandler)
Deprecated.
|
MongoService |
removeWithOptions(String collection,
JsonObject query,
WriteOption writeOption,
Handler<AsyncResult<Void>> resultHandler)
Deprecated.
|
MongoService |
replace(String collection,
JsonObject query,
JsonObject replace,
Handler<AsyncResult<Void>> resultHandler)
Deprecated.
|
MongoService |
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
|
MongoService |
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
|
MongoService |
replaceWithOptions(String collection,
JsonObject query,
JsonObject replace,
UpdateOptions options,
Handler<AsyncResult<Void>> resultHandler)
Deprecated.
|
MongoService |
runCommand(String commandName,
JsonObject command,
Handler<AsyncResult<JsonObject>> resultHandler)
Run an arbitrary MongoDB command.
|
Maybe<MongoClientBulkWriteResult> |
rxBulkWrite(String collection,
List<BulkOperation> operations)
Execute a bulk operation.
|
Maybe<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.
|
Completable |
rxCreateCollection(String collectionName)
Create a new collection
|
Completable |
rxCreateIndex(String collection,
JsonObject key)
Creates an index.
|
Completable |
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.
|
Completable |
rxDropCollection(String collection)
Drop a collection
|
Completable |
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
|
Maybe<JsonObject> |
rxFindOne(String collection,
JsonObject query,
JsonObject fields)
Find a single matching document in the specified collection
|
Maybe<JsonObject> |
rxFindOneAndDelete(String collection,
JsonObject query)
Find a single matching document in the specified collection and delete it.
|
Maybe<JsonObject> |
rxFindOneAndDeleteWithOptions(String collection,
JsonObject query,
FindOptions findOptions)
Find a single matching document in the specified collection and delete it.
|
Maybe<JsonObject> |
rxFindOneAndReplace(String collection,
JsonObject query,
JsonObject replace)
Find a single matching document in the specified collection and replace it.
|
Maybe<JsonObject> |
rxFindOneAndReplaceWithOptions(String collection,
JsonObject query,
JsonObject update,
FindOptions findOptions,
UpdateOptions updateOptions)
Find a single matching document in the specified collection and replace it.
|
Maybe<JsonObject> |
rxFindOneAndUpdate(String collection,
JsonObject query,
JsonObject update)
Find a single matching document in the specified collection and update it.
|
Maybe<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.
|
Maybe<String> |
rxInsert(String collection,
JsonObject document)
Insert a document in the specified collection
|
Maybe<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.
|
Completable |
rxRemove(String collection,
JsonObject query)
Deprecated.
|
Maybe<MongoClientDeleteResult> |
rxRemoveDocument(String collection,
JsonObject query)
Remove a single matching document from a collection and return the handler with MongoClientDeleteResult result
|
Maybe<MongoClientDeleteResult> |
rxRemoveDocuments(String collection,
JsonObject query)
Remove matching documents from a collection and return the handler with MongoClientDeleteResult result
|
Maybe<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
|
Maybe<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
|
Completable |
rxRemoveOne(String collection,
JsonObject query)
Deprecated.
|
Completable |
rxRemoveOneWithOptions(String collection,
JsonObject query,
WriteOption writeOption)
Deprecated.
|
Completable |
rxRemoveWithOptions(String collection,
JsonObject query,
WriteOption writeOption)
Deprecated.
|
Completable |
rxReplace(String collection,
JsonObject query,
JsonObject replace)
Deprecated.
|
Maybe<MongoClientUpdateResult> |
rxReplaceDocuments(String collection,
JsonObject query,
JsonObject replace)
Replace matching documents in the specified collection and return the handler with MongoClientUpdateResult result
|
Maybe<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
|
Completable |
rxReplaceWithOptions(String collection,
JsonObject query,
JsonObject replace,
UpdateOptions options)
Deprecated.
|
Maybe<JsonObject> |
rxRunCommand(String commandName,
JsonObject command)
Run an arbitrary MongoDB command.
|
Maybe<String> |
rxSave(String collection,
JsonObject document)
Save a document in the specified collection
|
Maybe<String> |
rxSaveWithOptions(String collection,
JsonObject document,
WriteOption writeOption)
Save a document in the specified collection with the specified write option
|
Completable |
rxUpdate(String collection,
JsonObject query,
JsonObject update)
Deprecated.
|
Maybe<MongoClientUpdateResult> |
rxUpdateCollection(String collection,
JsonObject query,
JsonObject update)
Update matching documents in the specified collection and return the handler with MongoClientUpdateResult result
|
Maybe<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
|
Completable |
rxUpdateWithOptions(String collection,
JsonObject query,
JsonObject update,
UpdateOptions options)
Deprecated.
|
MongoService |
save(String collection,
JsonObject document,
Handler<AsyncResult<String>> resultHandler)
Save a document in the specified collection
|
MongoService |
saveWithOptions(String collection,
JsonObject document,
WriteOption writeOption,
Handler<AsyncResult<String>> resultHandler)
Save a document in the specified collection with the specified write option
|
String |
toString() |
MongoService |
update(String collection,
JsonObject query,
JsonObject update,
Handler<AsyncResult<Void>> resultHandler)
Deprecated.
|
MongoService |
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
|
MongoService |
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
|
MongoService |
updateWithOptions(String collection,
JsonObject query,
JsonObject update,
UpdateOptions options,
Handler<AsyncResult<Void>> resultHandler)
Deprecated.
|
aggregate, aggregateWithOptions, create, createNonShared, createShared, createShared, distinctBatch, distinctBatchWithQuery, distinctBatchWithQuery, findBatch, findBatchWithOptions, newInstance
public static final io.vertx.lang.rx.TypeArg<MongoService> __TYPE_ARG
public static final String DEFAULT_POOL_NAME
public static final String DEFAULT_DB_NAME
public MongoService(MongoService delegate)
public MongoService(Object delegate)
public String toString()
toString
in class MongoClient
public boolean equals(Object o)
equals
in class MongoClient
public int hashCode()
hashCode
in class MongoClient
public MongoService getDelegate()
getDelegate
in class MongoClient
public static MongoService createEventBusProxy(Vertx vertx, String address)
vertx
- the Vert.x instanceaddress
- the address the service is listening on on the event buspublic MongoService save(String collection, JsonObject document, Handler<AsyncResult<String>> resultHandler)
MongoClient
This operation might change _id field of document parameter
save
in class MongoClient
collection
- the collectiondocument
- the documentresultHandler
- result handler will be provided with the id if document didn't already have onepublic Maybe<String> rxSave(String collection, JsonObject document)
MongoClient
This operation might change _id field of document parameter
rxSave
in class MongoClient
collection
- the collectiondocument
- the documentpublic MongoService saveWithOptions(String collection, JsonObject document, WriteOption writeOption, Handler<AsyncResult<String>> resultHandler)
MongoClient
This operation might change _id field of document parameter
saveWithOptions
in class MongoClient
collection
- the collectiondocument
- the documentwriteOption
- the write option to useresultHandler
- result handler will be provided with the id if document didn't already have onepublic Maybe<String> rxSaveWithOptions(String collection, JsonObject document, WriteOption writeOption)
MongoClient
This operation might change _id field of document parameter
rxSaveWithOptions
in class MongoClient
collection
- the collectiondocument
- the documentwriteOption
- the write option to usepublic MongoService insert(String collection, JsonObject document, Handler<AsyncResult<String>> resultHandler)
MongoClient
This operation might change _id field of document parameter
insert
in class MongoClient
collection
- the collectiondocument
- the documentresultHandler
- result handler will be provided with the id if document didn't already have onepublic Maybe<String> rxInsert(String collection, JsonObject document)
MongoClient
This operation might change _id field of document parameter
rxInsert
in class MongoClient
collection
- the collectiondocument
- the documentpublic MongoService insertWithOptions(String collection, JsonObject document, WriteOption writeOption, Handler<AsyncResult<String>> resultHandler)
MongoClient
This operation might change _id field of document parameter
insertWithOptions
in class MongoClient
collection
- the collectiondocument
- the documentwriteOption
- the write option to useresultHandler
- result handler will be provided with the id if document didn't already have onepublic Maybe<String> rxInsertWithOptions(String collection, JsonObject document, WriteOption writeOption)
MongoClient
This operation might change _id field of document parameter
rxInsertWithOptions
in class MongoClient
collection
- the collectiondocument
- the documentwriteOption
- the write option to use@Deprecated public MongoService update(String collection, JsonObject query, JsonObject update, Handler<AsyncResult<Void>> resultHandler)
MongoClient
update
in class MongoClient
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 Completable rxUpdate(String collection, JsonObject query, JsonObject update)
MongoClient
rxUpdate
in class MongoClient
collection
- the collectionquery
- query used to match the documentsupdate
- used to describe how the documents will be updatedpublic MongoService updateCollection(String collection, JsonObject query, JsonObject update, Handler<AsyncResult<MongoClientUpdateResult>> resultHandler)
MongoClient
updateCollection
in class MongoClient
collection
- the collectionquery
- query used to match the documentsupdate
- used to describe how the documents will be updatedresultHandler
- will be called when completepublic Maybe<MongoClientUpdateResult> rxUpdateCollection(String collection, JsonObject query, JsonObject update)
MongoClient
rxUpdateCollection
in class MongoClient
collection
- the collectionquery
- query used to match the documentsupdate
- used to describe how the documents will be updated@Deprecated public MongoService updateWithOptions(String collection, JsonObject query, JsonObject update, UpdateOptions options, Handler<AsyncResult<Void>> resultHandler)
MongoClient
updateWithOptions
in class MongoClient
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 Completable rxUpdateWithOptions(String collection, JsonObject query, JsonObject update, UpdateOptions options)
MongoClient
rxUpdateWithOptions
in class MongoClient
collection
- the collectionquery
- query used to match the documentsupdate
- used to describe how the documents will be updatedoptions
- options to configure the updatepublic MongoService updateCollectionWithOptions(String collection, JsonObject query, JsonObject update, UpdateOptions options, Handler<AsyncResult<MongoClientUpdateResult>> resultHandler)
MongoClient
updateCollectionWithOptions
in class MongoClient
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 completepublic Maybe<MongoClientUpdateResult> rxUpdateCollectionWithOptions(String collection, JsonObject query, JsonObject update, UpdateOptions options)
MongoClient
rxUpdateCollectionWithOptions
in class MongoClient
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 MongoService replace(String collection, JsonObject query, JsonObject replace, Handler<AsyncResult<Void>> resultHandler)
MongoClient
This operation might change _id field of replace parameter
replace
in class MongoClient
collection
- the collectionquery
- query used to match the documentsreplace
- all matching documents will be replaced with thisresultHandler
- will be called when complete@Deprecated public Completable rxReplace(String collection, JsonObject query, JsonObject replace)
MongoClient
This operation might change _id field of replace parameter
rxReplace
in class MongoClient
collection
- the collectionquery
- query used to match the documentsreplace
- all matching documents will be replaced with thispublic MongoService replaceDocuments(String collection, JsonObject query, JsonObject replace, Handler<AsyncResult<MongoClientUpdateResult>> resultHandler)
MongoClient
replaceDocuments
in class MongoClient
collection
- the collectionquery
- query used to match the documentsreplace
- all matching documents will be replaced with thisresultHandler
- will be called when completepublic Maybe<MongoClientUpdateResult> rxReplaceDocuments(String collection, JsonObject query, JsonObject replace)
MongoClient
rxReplaceDocuments
in class MongoClient
collection
- the collectionquery
- query used to match the documentsreplace
- all matching documents will be replaced with this@Deprecated public MongoService replaceWithOptions(String collection, JsonObject query, JsonObject replace, UpdateOptions options, Handler<AsyncResult<Void>> resultHandler)
MongoClient
This operation might change _id field of replace parameter
replaceWithOptions
in class MongoClient
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 Completable rxReplaceWithOptions(String collection, JsonObject query, JsonObject replace, UpdateOptions options)
MongoClient
This operation might change _id field of replace parameter
rxReplaceWithOptions
in class MongoClient
collection
- the collectionquery
- query used to match the documentsreplace
- all matching documents will be replaced with thisoptions
- options to configure the replacepublic MongoService replaceDocumentsWithOptions(String collection, JsonObject query, JsonObject replace, UpdateOptions options, Handler<AsyncResult<MongoClientUpdateResult>> resultHandler)
MongoClient
replaceDocumentsWithOptions
in class MongoClient
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 completepublic Maybe<MongoClientUpdateResult> rxReplaceDocumentsWithOptions(String collection, JsonObject query, JsonObject replace, UpdateOptions options)
MongoClient
rxReplaceDocumentsWithOptions
in class MongoClient
collection
- the collectionquery
- query used to match the documentsreplace
- all matching documents will be replaced with thisoptions
- options to configure the replacepublic MongoService bulkWrite(String collection, List<BulkOperation> operations, Handler<AsyncResult<MongoClientBulkWriteResult>> resultHandler)
MongoClient
bulkWrite
in class MongoClient
collection
- the collectionoperations
- the operations to executeresultHandler
- will be called with a MongoClientBulkWriteResult
when completepublic Maybe<MongoClientBulkWriteResult> rxBulkWrite(String collection, List<BulkOperation> operations)
MongoClient
rxBulkWrite
in class MongoClient
collection
- the collectionoperations
- the operations to executepublic MongoService bulkWriteWithOptions(String collection, List<BulkOperation> operations, BulkWriteOptions bulkWriteOptions, Handler<AsyncResult<MongoClientBulkWriteResult>> resultHandler)
MongoClient
bulkWriteWithOptions
in class MongoClient
collection
- the collectionoperations
- the operations to executebulkWriteOptions
- the write optionsresultHandler
- will be called with a MongoClientBulkWriteResult
when completepublic Maybe<MongoClientBulkWriteResult> rxBulkWriteWithOptions(String collection, List<BulkOperation> operations, BulkWriteOptions bulkWriteOptions)
MongoClient
rxBulkWriteWithOptions
in class MongoClient
collection
- the collectionoperations
- the operations to executebulkWriteOptions
- the write optionspublic MongoService find(String collection, JsonObject query, Handler<AsyncResult<List<JsonObject>>> resultHandler)
MongoClient
find
in class MongoClient
collection
- the collectionquery
- query used to match documentsresultHandler
- will be provided with list of documentspublic Single<List<JsonObject>> rxFind(String collection, JsonObject query)
MongoClient
rxFind
in class MongoClient
collection
- the collectionquery
- query used to match documentspublic MongoService findWithOptions(String collection, JsonObject query, FindOptions options, Handler<AsyncResult<List<JsonObject>>> resultHandler)
MongoClient
findWithOptions
in class MongoClient
collection
- the collectionquery
- query used to match documentsoptions
- options to configure the findresultHandler
- will be provided with list of documentspublic Single<List<JsonObject>> rxFindWithOptions(String collection, JsonObject query, FindOptions options)
MongoClient
rxFindWithOptions
in class MongoClient
collection
- the collectionquery
- query used to match documentsoptions
- options to configure the findpublic MongoService findOne(String collection, JsonObject query, JsonObject fields, Handler<AsyncResult<JsonObject>> resultHandler)
MongoClient
This operation might change _id field of query parameter
findOne
in class MongoClient
collection
- the collectionquery
- the query used to match the documentfields
- the fieldsresultHandler
- will be provided with the document, if anypublic Maybe<JsonObject> rxFindOne(String collection, JsonObject query, JsonObject fields)
MongoClient
This operation might change _id field of query parameter
rxFindOne
in class MongoClient
collection
- the collectionquery
- the query used to match the documentfields
- the fieldspublic MongoService findOneAndUpdate(String collection, JsonObject query, JsonObject update, Handler<AsyncResult<JsonObject>> resultHandler)
MongoClient
This operation might change _id field of query parameter
findOneAndUpdate
in class MongoClient
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 anypublic Maybe<JsonObject> rxFindOneAndUpdate(String collection, JsonObject query, JsonObject update)
MongoClient
This operation might change _id field of query parameter
rxFindOneAndUpdate
in class MongoClient
collection
- the collectionquery
- the query used to match the documentupdate
- used to describe how the documents will be updatedpublic MongoService findOneAndUpdateWithOptions(String collection, JsonObject query, JsonObject update, FindOptions findOptions, UpdateOptions updateOptions, Handler<AsyncResult<JsonObject>> resultHandler)
MongoClient
This operation might change _id field of query parameter
findOneAndUpdateWithOptions
in class MongoClient
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 anypublic Maybe<JsonObject> rxFindOneAndUpdateWithOptions(String collection, JsonObject query, JsonObject update, FindOptions findOptions, UpdateOptions updateOptions)
MongoClient
This operation might change _id field of query parameter
rxFindOneAndUpdateWithOptions
in class MongoClient
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 MongoService findOneAndReplace(String collection, JsonObject query, JsonObject replace, Handler<AsyncResult<JsonObject>> resultHandler)
MongoClient
This operation might change _id field of query parameter
findOneAndReplace
in class MongoClient
collection
- the collectionquery
- the query used to match the documentreplace
- the replacement documentresultHandler
- will be provided with the document, if anypublic Maybe<JsonObject> rxFindOneAndReplace(String collection, JsonObject query, JsonObject replace)
MongoClient
This operation might change _id field of query parameter
rxFindOneAndReplace
in class MongoClient
collection
- the collectionquery
- the query used to match the documentreplace
- the replacement documentpublic MongoService findOneAndReplaceWithOptions(String collection, JsonObject query, JsonObject update, FindOptions findOptions, UpdateOptions updateOptions, Handler<AsyncResult<JsonObject>> resultHandler)
MongoClient
This operation might change _id field of query parameter
findOneAndReplaceWithOptions
in class MongoClient
collection
- the collectionquery
- the query used to match the documentupdate
- the replacement documentfindOptions
- options to configure the findupdateOptions
- options to configure the updateresultHandler
- will be provided with the document, if anypublic Maybe<JsonObject> rxFindOneAndReplaceWithOptions(String collection, JsonObject query, JsonObject update, FindOptions findOptions, UpdateOptions updateOptions)
MongoClient
This operation might change _id field of query parameter
rxFindOneAndReplaceWithOptions
in class MongoClient
collection
- the collectionquery
- the query used to match the documentupdate
- the replacement documentfindOptions
- options to configure the findupdateOptions
- options to configure the updatepublic MongoService findOneAndDelete(String collection, JsonObject query, Handler<AsyncResult<JsonObject>> resultHandler)
MongoClient
This operation might change _id field of query parameter
findOneAndDelete
in class MongoClient
collection
- the collectionquery
- the query used to match the documentresultHandler
- will be provided with the deleted document, if anypublic Maybe<JsonObject> rxFindOneAndDelete(String collection, JsonObject query)
MongoClient
This operation might change _id field of query parameter
rxFindOneAndDelete
in class MongoClient
collection
- the collectionquery
- the query used to match the documentpublic MongoService findOneAndDeleteWithOptions(String collection, JsonObject query, FindOptions findOptions, Handler<AsyncResult<JsonObject>> resultHandler)
MongoClient
This operation might change _id field of query parameter
findOneAndDeleteWithOptions
in class MongoClient
collection
- the collectionquery
- the query used to match the documentfindOptions
- options to configure the findresultHandler
- will be provided with the deleted document, if anypublic Maybe<JsonObject> rxFindOneAndDeleteWithOptions(String collection, JsonObject query, FindOptions findOptions)
MongoClient
This operation might change _id field of query parameter
rxFindOneAndDeleteWithOptions
in class MongoClient
collection
- the collectionquery
- the query used to match the documentfindOptions
- options to configure the findpublic MongoService count(String collection, JsonObject query, Handler<AsyncResult<Long>> resultHandler)
MongoClient
count
in class MongoClient
collection
- the collectionquery
- query used to match documentsresultHandler
- will be provided with the number of matching documentspublic Single<Long> rxCount(String collection, JsonObject query)
MongoClient
rxCount
in class MongoClient
collection
- the collectionquery
- query used to match documents@Deprecated public MongoService remove(String collection, JsonObject query, Handler<AsyncResult<Void>> resultHandler)
MongoClient
remove
in class MongoClient
collection
- the collectionquery
- query used to match documentsresultHandler
- will be called when complete@Deprecated public Completable rxRemove(String collection, JsonObject query)
MongoClient
rxRemove
in class MongoClient
collection
- the collectionquery
- query used to match documentspublic MongoService removeDocuments(String collection, JsonObject query, Handler<AsyncResult<MongoClientDeleteResult>> resultHandler)
MongoClient
removeDocuments
in class MongoClient
collection
- the collectionquery
- query used to match documentsresultHandler
- will be called when completepublic Maybe<MongoClientDeleteResult> rxRemoveDocuments(String collection, JsonObject query)
MongoClient
rxRemoveDocuments
in class MongoClient
collection
- the collectionquery
- query used to match documents@Deprecated public MongoService removeWithOptions(String collection, JsonObject query, WriteOption writeOption, Handler<AsyncResult<Void>> resultHandler)
MongoClient
removeWithOptions
in class MongoClient
collection
- the collectionquery
- query used to match documentswriteOption
- the write option to useresultHandler
- will be called when complete@Deprecated public Completable rxRemoveWithOptions(String collection, JsonObject query, WriteOption writeOption)
MongoClient
rxRemoveWithOptions
in class MongoClient
collection
- the collectionquery
- query used to match documentswriteOption
- the write option to usepublic MongoService removeDocumentsWithOptions(String collection, JsonObject query, WriteOption writeOption, Handler<AsyncResult<MongoClientDeleteResult>> resultHandler)
MongoClient
removeDocumentsWithOptions
in class MongoClient
collection
- the collectionquery
- query used to match documentswriteOption
- the write option to useresultHandler
- will be called when completepublic Maybe<MongoClientDeleteResult> rxRemoveDocumentsWithOptions(String collection, JsonObject query, WriteOption writeOption)
MongoClient
rxRemoveDocumentsWithOptions
in class MongoClient
collection
- the collectionquery
- query used to match documentswriteOption
- the write option to use@Deprecated public MongoService removeOne(String collection, JsonObject query, Handler<AsyncResult<Void>> resultHandler)
MongoClient
removeOne
in class MongoClient
collection
- the collectionquery
- query used to match documentresultHandler
- will be called when complete@Deprecated public Completable rxRemoveOne(String collection, JsonObject query)
MongoClient
rxRemoveOne
in class MongoClient
collection
- the collectionquery
- query used to match documentpublic MongoService removeDocument(String collection, JsonObject query, Handler<AsyncResult<MongoClientDeleteResult>> resultHandler)
MongoClient
removeDocument
in class MongoClient
collection
- the collectionquery
- query used to match documentresultHandler
- will be called when completepublic Maybe<MongoClientDeleteResult> rxRemoveDocument(String collection, JsonObject query)
MongoClient
rxRemoveDocument
in class MongoClient
collection
- the collectionquery
- query used to match document@Deprecated public MongoService removeOneWithOptions(String collection, JsonObject query, WriteOption writeOption, Handler<AsyncResult<Void>> resultHandler)
MongoClient
removeOneWithOptions
in class MongoClient
collection
- the collectionquery
- query used to match documentwriteOption
- the write option to useresultHandler
- will be called when complete@Deprecated public Completable rxRemoveOneWithOptions(String collection, JsonObject query, WriteOption writeOption)
MongoClient
rxRemoveOneWithOptions
in class MongoClient
collection
- the collectionquery
- query used to match documentwriteOption
- the write option to usepublic MongoService removeDocumentWithOptions(String collection, JsonObject query, WriteOption writeOption, Handler<AsyncResult<MongoClientDeleteResult>> resultHandler)
MongoClient
removeDocumentWithOptions
in class MongoClient
collection
- the collectionquery
- query used to match documentwriteOption
- the write option to useresultHandler
- will be called when completepublic Maybe<MongoClientDeleteResult> rxRemoveDocumentWithOptions(String collection, JsonObject query, WriteOption writeOption)
MongoClient
rxRemoveDocumentWithOptions
in class MongoClient
collection
- the collectionquery
- query used to match documentwriteOption
- the write option to usepublic MongoService createCollection(String collectionName, Handler<AsyncResult<Void>> resultHandler)
MongoClient
createCollection
in class MongoClient
collectionName
- the name of the collectionresultHandler
- will be called when completepublic Completable rxCreateCollection(String collectionName)
MongoClient
rxCreateCollection
in class MongoClient
collectionName
- the name of the collectionpublic MongoService getCollections(Handler<AsyncResult<List<String>>> resultHandler)
MongoClient
getCollections
in class MongoClient
resultHandler
- will be called with a list of collections.public Single<List<String>> rxGetCollections()
MongoClient
rxGetCollections
in class MongoClient
public MongoService dropCollection(String collection, Handler<AsyncResult<Void>> resultHandler)
MongoClient
dropCollection
in class MongoClient
collection
- the collectionresultHandler
- will be called when completepublic Completable rxDropCollection(String collection)
MongoClient
rxDropCollection
in class MongoClient
collection
- the collectionpublic MongoService createIndex(String collection, JsonObject key, Handler<AsyncResult<Void>> resultHandler)
MongoClient
createIndex
in class MongoClient
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 completepublic Completable rxCreateIndex(String collection, JsonObject key)
MongoClient
rxCreateIndex
in class MongoClient
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 MongoService createIndexWithOptions(String collection, JsonObject key, IndexOptions options, Handler<AsyncResult<Void>> resultHandler)
MongoClient
createIndexWithOptions
in class MongoClient
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 completepublic Completable rxCreateIndexWithOptions(String collection, JsonObject key, IndexOptions options)
MongoClient
rxCreateIndexWithOptions
in class MongoClient
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 MongoService listIndexes(String collection, Handler<AsyncResult<JsonArray>> resultHandler)
MongoClient
listIndexes
in class MongoClient
collection
- the collectionresultHandler
- will be called when completepublic Single<JsonArray> rxListIndexes(String collection)
MongoClient
rxListIndexes
in class MongoClient
collection
- the collectionpublic MongoService dropIndex(String collection, String indexName, Handler<AsyncResult<Void>> resultHandler)
MongoClient
dropIndex
in class MongoClient
collection
- the collectionindexName
- the name of the index to removeresultHandler
- will be called when completepublic Completable rxDropIndex(String collection, String indexName)
MongoClient
rxDropIndex
in class MongoClient
collection
- the collectionindexName
- the name of the index to removepublic MongoService runCommand(String commandName, JsonObject command, Handler<AsyncResult<JsonObject>> resultHandler)
MongoClient
runCommand
in class MongoClient
commandName
- the name of the commandcommand
- the commandresultHandler
- will be called with the result.public Maybe<JsonObject> rxRunCommand(String commandName, JsonObject command)
MongoClient
rxRunCommand
in class MongoClient
commandName
- the name of the commandcommand
- the commandpublic MongoService distinct(String collection, String fieldName, String resultClassname, Handler<AsyncResult<JsonArray>> resultHandler)
MongoClient
distinct
in class MongoClient
collection
- the collectionfieldName
- the field nameresultHandler
- will be provided with array of values.public Single<JsonArray> rxDistinct(String collection, String fieldName, String resultClassname)
MongoClient
rxDistinct
in class MongoClient
collection
- the collectionfieldName
- the field namepublic MongoService distinctWithQuery(String collection, String fieldName, String resultClassname, JsonObject query, Handler<AsyncResult<JsonArray>> resultHandler)
MongoClient
distinctWithQuery
in class MongoClient
collection
- the collectionfieldName
- the field namequery
- the queryresultHandler
- will be provided with array of values.public Single<JsonArray> rxDistinctWithQuery(String collection, String fieldName, String resultClassname, JsonObject query)
MongoClient
rxDistinctWithQuery
in class MongoClient
collection
- the collectionfieldName
- the field namequery
- the querypublic void close()
MongoClient
close
in class MongoClient
public static MongoService newInstance(MongoService arg)
Copyright © 2023 Eclipse. All rights reserved.