Constructor and Description |
---|
MongoClient(MongoClient delegate) |
Modifier and Type | Method and Description |
---|---|
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)
Count matching documents in a collection.
|
MongoClient |
createCollection(String collectionName,
Handler<AsyncResult<Void>> resultHandler)
Create a new collection
|
Observable<Void> |
createCollectionObservable(String collectionName)
Create a new collection
|
static MongoClient |
createNonShared(Vertx vertx,
JsonObject config)
Create a Mongo client which maintains its own data source.
|
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.
|
MongoClient |
distinctBatch(String collection,
String fieldName,
String resultClassname,
Handler<AsyncResult<JsonObject>> resultHandler)
Gets the distinct values of the specified field name.
|
Observable<JsonObject> |
distinctBatchObservable(String collection,
String fieldName,
String resultClassname)
Gets the distinct values of the specified field name.
|
Observable<JsonArray> |
distinctObservable(String collection,
String fieldName,
String resultClassname)
Gets the distinct values of the specified field name.
|
MongoClient |
dropCollection(String collection,
Handler<AsyncResult<Void>> resultHandler)
Drop a collection
|
Observable<Void> |
dropCollectionObservable(String collection)
Drop a collection
|
MongoClient |
find(String collection,
JsonObject query,
Handler<AsyncResult<List<JsonObject>>> resultHandler)
Find matching documents in the specified collection
|
MongoClient |
findBatch(String collection,
JsonObject query,
Handler<AsyncResult<JsonObject>> resultHandler)
Find matching documents in the specified collection.
|
Observable<JsonObject> |
findBatchObservable(String collection,
JsonObject query)
Find matching documents in the specified collection.
|
MongoClient |
findBatchWithOptions(String collection,
JsonObject query,
FindOptions options,
Handler<AsyncResult<JsonObject>> resultHandler)
Find matching documents in the specified collection, specifying options.
|
Observable<JsonObject> |
findBatchWithOptionsObservable(String collection,
JsonObject query,
FindOptions options)
Find matching documents in the specified collection, specifying options.
|
Observable<List<JsonObject>> |
findObservable(String collection,
JsonObject query)
Find matching documents in the specified collection
|
MongoClient |
findOne(String collection,
JsonObject query,
JsonObject fields,
Handler<AsyncResult<JsonObject>> resultHandler)
Find a single matching document in the specified collection
|
Observable<JsonObject> |
findOneObservable(String collection,
JsonObject query,
JsonObject fields)
Find a single matching document in the specified collection
|
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)
Find matching documents in the specified collection, specifying options
|
MongoClient |
getCollections(Handler<AsyncResult<List<String>>> resultHandler)
Get a list of all collections in the database.
|
Observable<List<String>> |
getCollectionsObservable()
Get a list of all collections in the database.
|
Object |
getDelegate() |
MongoClient |
insert(String collection,
JsonObject document,
Handler<AsyncResult<String>> resultHandler)
Insert a document in the specified collection
|
Observable<String> |
insertObservable(String collection,
JsonObject document)
Insert a document in the specified collection
|
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)
Insert a document in the specified collection with the specified write option
|
static MongoClient |
newInstance(MongoClient arg) |
MongoClient |
remove(String collection,
JsonObject query,
Handler<AsyncResult<Void>> resultHandler)
Remove matching documents from a collection
|
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)
Remove a single matching document from a collection and return the handler with MongoClientDeleteResult result
|
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)
Remove matching documents from a collection and return the handler with MongoClientDeleteResult result
|
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)
Remove matching documents from a collection with the specified write option and return the handler with MongoClientDeleteResult result
|
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)
Remove a single matching document from a collection with the specified write option and return the handler with MongoClientDeleteResult result
|
Observable<Void> |
removeObservable(String collection,
JsonObject query)
Remove matching documents from a collection
|
MongoClient |
removeOne(String collection,
JsonObject query,
Handler<AsyncResult<Void>> resultHandler)
Remove a single matching document from a collection
|
Observable<Void> |
removeOneObservable(String collection,
JsonObject query)
Remove a single matching document from a collection
|
MongoClient |
removeOneWithOptions(String collection,
JsonObject query,
WriteOption writeOption,
Handler<AsyncResult<Void>> resultHandler)
Remove a single matching document from a collection with the specified write option
|
Observable<Void> |
removeOneWithOptionsObservable(String collection,
JsonObject query,
WriteOption writeOption)
Remove a single matching document from a collection with the specified write option
|
MongoClient |
removeWithOptions(String collection,
JsonObject query,
WriteOption writeOption,
Handler<AsyncResult<Void>> resultHandler)
Remove matching documents from a collection with the specified write option
|
Observable<Void> |
removeWithOptionsObservable(String collection,
JsonObject query,
WriteOption writeOption)
Remove matching documents from a collection with the specified write option
|
MongoClient |
replace(String collection,
JsonObject query,
JsonObject replace,
Handler<AsyncResult<Void>> resultHandler)
Replace matching documents in the specified collection
|
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)
Replace matching documents in the specified collection and return the handler with MongoClientUpdateResult result
|
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)
Replace matching documents in the specified collection, specifying options and return the handler with MongoClientUpdateResult result
|
Observable<Void> |
replaceObservable(String collection,
JsonObject query,
JsonObject replace)
Replace matching documents in the specified collection
|
MongoClient |
replaceWithOptions(String collection,
JsonObject query,
JsonObject replace,
UpdateOptions options,
Handler<AsyncResult<Void>> resultHandler)
Replace matching documents in the specified collection, specifying options
|
Observable<Void> |
replaceWithOptionsObservable(String collection,
JsonObject query,
JsonObject replace,
UpdateOptions options)
Replace matching documents in the specified collection, specifying options
|
MongoClient |
runCommand(String commandName,
JsonObject command,
Handler<AsyncResult<JsonObject>> resultHandler)
Run an arbitrary MongoDB command.
|
Observable<JsonObject> |
runCommandObservable(String commandName,
JsonObject command)
Run an arbitrary MongoDB command.
|
MongoClient |
save(String collection,
JsonObject document,
Handler<AsyncResult<String>> resultHandler)
Save a document in the specified collection
|
Observable<String> |
saveObservable(String collection,
JsonObject document)
Save a document in the specified collection
|
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)
Save a document in the specified collection with the specified write option
|
MongoClient |
update(String collection,
JsonObject query,
JsonObject update,
Handler<AsyncResult<Void>> resultHandler)
Update matching documents in the specified collection
|
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)
Update matching documents in the specified collection and return the handler with MongoClientUpdateResult result
|
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)
Update matching documents in the specified collection, specifying options and return the handler with MongoClientUpdateResult result
|
Observable<Void> |
updateObservable(String collection,
JsonObject query,
JsonObject update)
Update matching documents in the specified collection
|
MongoClient |
updateWithOptions(String collection,
JsonObject query,
JsonObject update,
UpdateOptions options,
Handler<AsyncResult<Void>> resultHandler)
Update matching documents in the specified collection, specifying options
|
Observable<Void> |
updateWithOptionsObservable(String collection,
JsonObject query,
JsonObject update,
UpdateOptions options)
Update matching documents in the specified collection, specifying options
|
public MongoClient(MongoClient delegate)
public Object getDelegate()
public static MongoClient createNonShared(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 onepublic Observable<String> saveObservable(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 onepublic Observable<String> saveWithOptionsObservable(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 onepublic Observable<String> insertObservable(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 onepublic Observable<String> insertWithOptionsObservable(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 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 completepublic Observable<Void> updateObservable(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 completepublic Observable<MongoClientUpdateResult> updateCollectionObservable(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 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 completepublic Observable<Void> updateWithOptionsObservable(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 completepublic Observable<MongoClientUpdateResult> updateCollectionWithOptionsObservable(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 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 completepublic Observable<Void> replaceObservable(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 completepublic Observable<MongoClientUpdateResult> replaceDocumentsObservable(String collection, JsonObject query, JsonObject replace)
collection
- the collectionquery
- query used to match the documentsreplace
- all matching documents will be replaced with thispublic 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 completepublic Observable<Void> replaceWithOptionsObservable(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 completepublic Observable<MongoClientUpdateResult> replaceDocumentsWithOptionsObservable(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 find(String collection, JsonObject query, Handler<AsyncResult<List<JsonObject>>> resultHandler)
collection
- the collectionquery
- query used to match documentsresultHandler
- will be provided with list of documentspublic Observable<List<JsonObject>> findObservable(String collection, JsonObject query)
collection
- the collectionquery
- query used to match documentspublic MongoClient findBatch(String collection, JsonObject query, Handler<AsyncResult<JsonObject>> resultHandler)
collection
- the collectionquery
- query used to match documentsresultHandler
- will be provided with each found documentpublic Observable<JsonObject> findBatchObservable(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 documentspublic Observable<List<JsonObject>> findWithOptionsObservable(String collection, JsonObject query, FindOptions options)
collection
- the collectionquery
- query used to match documentsoptions
- options to configure the findpublic MongoClient findBatchWithOptions(String collection, JsonObject query, FindOptions options, Handler<AsyncResult<JsonObject>> resultHandler)
collection
- the collectionquery
- query used to match documentsoptions
- options to configure the findresultHandler
- will be provided with each found documentpublic Observable<JsonObject> findBatchWithOptionsObservable(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 anypublic Observable<JsonObject> findOneObservable(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 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 documentspublic Observable<Long> countObservable(String collection, JsonObject query)
collection
- the collectionquery
- query used to match documentspublic MongoClient remove(String collection, JsonObject query, Handler<AsyncResult<Void>> resultHandler)
collection
- the collectionquery
- query used to match documentsresultHandler
- will be called when completepublic Observable<Void> removeObservable(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 completepublic Observable<MongoClientDeleteResult> removeDocumentsObservable(String collection, JsonObject query)
collection
- the collectionquery
- query used to match documentspublic 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 completepublic Observable<Void> removeWithOptionsObservable(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 completepublic Observable<MongoClientDeleteResult> removeDocumentsWithOptionsObservable(String collection, JsonObject query, WriteOption writeOption)
collection
- the collectionquery
- query used to match documentswriteOption
- the write option to usepublic MongoClient removeOne(String collection, JsonObject query, Handler<AsyncResult<Void>> resultHandler)
collection
- the collectionquery
- query used to match documentresultHandler
- will be called when completepublic Observable<Void> removeOneObservable(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 completepublic Observable<MongoClientDeleteResult> removeDocumentObservable(String collection, JsonObject query)
collection
- the collectionquery
- query used to match documentpublic 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 completepublic Observable<Void> removeOneWithOptionsObservable(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 completepublic Observable<MongoClientDeleteResult> removeDocumentWithOptionsObservable(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 completepublic Observable<Void> createCollectionObservable(String collectionName)
collectionName
- the name of the collectionpublic MongoClient getCollections(Handler<AsyncResult<List<String>>> resultHandler)
resultHandler
- will be called with a list of collections.public Observable<List<String>> getCollectionsObservable()
public MongoClient dropCollection(String collection, Handler<AsyncResult<Void>> resultHandler)
collection
- the collectionresultHandler
- will be called when completepublic Observable<Void> dropCollectionObservable(String collection)
collection
- the collectionpublic MongoClient runCommand(String commandName, JsonObject command, Handler<AsyncResult<JsonObject>> resultHandler)
commandName
- the name of the commandcommand
- the commandresultHandler
- will be called with the result.public Observable<JsonObject> runCommandObservable(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.public Observable<JsonArray> distinctObservable(String collection, String fieldName, String resultClassname)
collection
- the collectionfieldName
- the field nameresultClassname
- public MongoClient distinctBatch(String collection, String fieldName, String resultClassname, Handler<AsyncResult<JsonObject>> resultHandler)
collection
- the collectionfieldName
- the field nameresultClassname
- resultHandler
- will be provided with each found valuepublic Observable<JsonObject> distinctBatchObservable(String collection, String fieldName, String resultClassname)
collection
- the collectionfieldName
- the field nameresultClassname
- public void close()
public static MongoClient newInstance(MongoClient arg)
Copyright © 2016. All rights reserved.