/*
* Copyright 2014 Red Hat, Inc.
*
* Red Hat licenses this file to you under the Apache License, version 2.0
* (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.vertx.rxjava.ext.mongo;
import java.util.Map;
import rx.Observable;
import rx.Single;
import io.vertx.ext.mongo.MongoClientDeleteResult;
import io.vertx.ext.mongo.AggregateOptions;
import io.vertx.ext.mongo.WriteOption;
import io.vertx.ext.mongo.BulkOperation;
import io.vertx.ext.mongo.MongoClientBulkWriteResult;
import io.vertx.core.json.JsonArray;
import java.util.List;
import io.vertx.ext.mongo.IndexOptions;
import io.vertx.ext.mongo.BulkWriteOptions;
import io.vertx.ext.mongo.FindOptions;
import io.vertx.core.json.JsonObject;
import io.vertx.core.AsyncResult;
import io.vertx.core.Handler;
import io.vertx.ext.mongo.MongoClientUpdateResult;
import io.vertx.ext.mongo.UpdateOptions;
A Vert.x service used to interact with MongoDB server instances.
Some of the operations might change _id field of passed document.
NOTE: This class has been automatically generated from the original
non RX-ified interface using Vert.x codegen. /**
* A Vert.x service used to interact with MongoDB server instances.
* <p>
* Some of the operations might change <i>_id</i> field of passed document.
*
* <p/>
* NOTE: This class has been automatically generated from the {@link io.vertx.ext.mongo.MongoClient original} non RX-ified interface using Vert.x codegen.
*/
@io.vertx.lang.rx.RxGen(io.vertx.ext.mongo.MongoClient.class)
public class MongoClient {
@Override
public String toString() {
return delegate.toString();
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
MongoClient that = (MongoClient) o;
return delegate.equals(that.delegate);
}
@Override
public int hashCode() {
return delegate.hashCode();
}
public static final io.vertx.lang.rx.TypeArg<MongoClient> __TYPE_ARG = new io.vertx.lang.rx.TypeArg<>( obj -> new MongoClient((io.vertx.ext.mongo.MongoClient) obj),
MongoClient::getDelegate
);
private final io.vertx.ext.mongo.MongoClient delegate;
public MongoClient(io.vertx.ext.mongo.MongoClient delegate) {
this.delegate = delegate;
}
public io.vertx.ext.mongo.MongoClient getDelegate() {
return delegate;
}
Create a Mongo client which maintains its own data source.
Params: - vertx – the Vert.x instance
- config – the configuration
Returns: the client
/**
* Create a Mongo client which maintains its own data source.
* @param vertx the Vert.x instance
* @param config the configuration
* @return the client
*/
public static io.vertx.rxjava.ext.mongo.MongoClient createNonShared(io.vertx.rxjava.core.Vertx vertx, JsonObject config) {
io.vertx.rxjava.ext.mongo.MongoClient ret = io.vertx.rxjava.ext.mongo.MongoClient.newInstance(io.vertx.ext.mongo.MongoClient.createNonShared(vertx.getDelegate(), config));
return ret;
}
Create a Mongo client which shares its data source with any other Mongo clients created with the same
data source name
Params: - vertx – the Vert.x instance
- config – the configuration
- dataSourceName – the data source name
Returns: the client
/**
* Create a Mongo client which shares its data source with any other Mongo clients created with the same
* data source name
* @param vertx the Vert.x instance
* @param config the configuration
* @param dataSourceName the data source name
* @return the client
*/
public static io.vertx.rxjava.ext.mongo.MongoClient createShared(io.vertx.rxjava.core.Vertx vertx, JsonObject config, String dataSourceName) {
io.vertx.rxjava.ext.mongo.MongoClient ret = io.vertx.rxjava.ext.mongo.MongoClient.newInstance(io.vertx.ext.mongo.MongoClient.createShared(vertx.getDelegate(), config, dataSourceName));
return ret;
}
Like createShared
but with the default data source name Params: - vertx – the Vert.x instance
- config – the configuration
Returns: the client
/**
* Like {@link io.vertx.rxjava.ext.mongo.MongoClient#createShared} but with the default data source name
* @param vertx the Vert.x instance
* @param config the configuration
* @return the client
*/
public static io.vertx.rxjava.ext.mongo.MongoClient createShared(io.vertx.rxjava.core.Vertx vertx, JsonObject config) {
io.vertx.rxjava.ext.mongo.MongoClient ret = io.vertx.rxjava.ext.mongo.MongoClient.newInstance(io.vertx.ext.mongo.MongoClient.createShared(vertx.getDelegate(), config));
return ret;
}
Save a document in the specified collection
This operation might change _id field of document parameter
Params: - collection – the collection
- document – the document
- resultHandler – result handler will be provided with the id if document didn't already have one
Returns:
/**
* Save a document in the specified collection
* <p>
* This operation might change <i>_id</i> field of <i>document</i> parameter
* @param collection the collection
* @param document the document
* @param resultHandler result handler will be provided with the id if document didn't already have one
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient save(String collection, JsonObject document, Handler<AsyncResult<String>> resultHandler) {
delegate.save(collection, document, resultHandler);
return this;
}
Save a document in the specified collection
This operation might change _id field of document parameter
Params: - collection – the collection
- document – the document
Returns: Deprecated: use rxSave
instead
/**
* Save a document in the specified collection
* <p>
* This operation might change <i>_id</i> field of <i>document</i> parameter
* @param collection the collection
* @param document the document
* @return
* @deprecated use {@link #rxSave} instead
*/
@Deprecated()
public Observable<String> saveObservable(String collection, JsonObject document) {
io.vertx.rx.java.ObservableFuture<String> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
save(collection, document, resultHandler.toHandler());
return resultHandler;
}
Save a document in the specified collection
This operation might change _id field of document parameter
Params: - collection – the collection
- document – the document
Returns:
/**
* Save a document in the specified collection
* <p>
* This operation might change <i>_id</i> field of <i>document</i> parameter
* @param collection the collection
* @param document the document
* @return
*/
public Single<String> rxSave(String collection, JsonObject document) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
save(collection, document, fut);
}));
}
Save a document in the specified collection with the specified write option
This operation might change _id field of document parameter
Params: - collection – the collection
- document – the document
- writeOption – the write option to use
- resultHandler – result handler will be provided with the id if document didn't already have one
Returns:
/**
* Save a document in the specified collection with the specified write option
* <p>
* This operation might change <i>_id</i> field of <i>document</i> parameter
* @param collection the collection
* @param document the document
* @param writeOption the write option to use
* @param resultHandler result handler will be provided with the id if document didn't already have one
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient saveWithOptions(String collection, JsonObject document, WriteOption writeOption, Handler<AsyncResult<String>> resultHandler) {
delegate.saveWithOptions(collection, document, writeOption, resultHandler);
return this;
}
Save a document in the specified collection with the specified write option
This operation might change _id field of document parameter
Params: - collection – the collection
- document – the document
- writeOption – the write option to use
Returns: Deprecated: use rxSaveWithOptions
instead
/**
* Save a document in the specified collection with the specified write option
* <p>
* This operation might change <i>_id</i> field of <i>document</i> parameter
* @param collection the collection
* @param document the document
* @param writeOption the write option to use
* @return
* @deprecated use {@link #rxSaveWithOptions} instead
*/
@Deprecated()
public Observable<String> saveWithOptionsObservable(String collection, JsonObject document, WriteOption writeOption) {
io.vertx.rx.java.ObservableFuture<String> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
saveWithOptions(collection, document, writeOption, resultHandler.toHandler());
return resultHandler;
}
Save a document in the specified collection with the specified write option
This operation might change _id field of document parameter
Params: - collection – the collection
- document – the document
- writeOption – the write option to use
Returns:
/**
* Save a document in the specified collection with the specified write option
* <p>
* This operation might change <i>_id</i> field of <i>document</i> parameter
* @param collection the collection
* @param document the document
* @param writeOption the write option to use
* @return
*/
public Single<String> rxSaveWithOptions(String collection, JsonObject document, WriteOption writeOption) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
saveWithOptions(collection, document, writeOption, fut);
}));
}
Insert a document in the specified collection
This operation might change _id field of document parameter
Params: - collection – the collection
- document – the document
- resultHandler – result handler will be provided with the id if document didn't already have one
Returns:
/**
* Insert a document in the specified collection
* <p>
* This operation might change <i>_id</i> field of <i>document</i> parameter
* @param collection the collection
* @param document the document
* @param resultHandler result handler will be provided with the id if document didn't already have one
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient insert(String collection, JsonObject document, Handler<AsyncResult<String>> resultHandler) {
delegate.insert(collection, document, resultHandler);
return this;
}
Insert a document in the specified collection
This operation might change _id field of document parameter
Params: - collection – the collection
- document – the document
Returns: Deprecated: use rxInsert
instead
/**
* Insert a document in the specified collection
* <p>
* This operation might change <i>_id</i> field of <i>document</i> parameter
* @param collection the collection
* @param document the document
* @return
* @deprecated use {@link #rxInsert} instead
*/
@Deprecated()
public Observable<String> insertObservable(String collection, JsonObject document) {
io.vertx.rx.java.ObservableFuture<String> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
insert(collection, document, resultHandler.toHandler());
return resultHandler;
}
Insert a document in the specified collection
This operation might change _id field of document parameter
Params: - collection – the collection
- document – the document
Returns:
/**
* Insert a document in the specified collection
* <p>
* This operation might change <i>_id</i> field of <i>document</i> parameter
* @param collection the collection
* @param document the document
* @return
*/
public Single<String> rxInsert(String collection, JsonObject document) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
insert(collection, document, fut);
}));
}
Insert a document in the specified collection with the specified write option
This operation might change _id field of document parameter
Params: - collection – the collection
- document – the document
- writeOption – the write option to use
- resultHandler – result handler will be provided with the id if document didn't already have one
Returns:
/**
* Insert a document in the specified collection with the specified write option
* <p>
* This operation might change <i>_id</i> field of <i>document</i> parameter
* @param collection the collection
* @param document the document
* @param writeOption the write option to use
* @param resultHandler result handler will be provided with the id if document didn't already have one
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient insertWithOptions(String collection, JsonObject document, WriteOption writeOption, Handler<AsyncResult<String>> resultHandler) {
delegate.insertWithOptions(collection, document, writeOption, resultHandler);
return this;
}
Insert a document in the specified collection with the specified write option
This operation might change _id field of document parameter
Params: - collection – the collection
- document – the document
- writeOption – the write option to use
Returns: Deprecated: use rxInsertWithOptions
instead
/**
* Insert a document in the specified collection with the specified write option
* <p>
* This operation might change <i>_id</i> field of <i>document</i> parameter
* @param collection the collection
* @param document the document
* @param writeOption the write option to use
* @return
* @deprecated use {@link #rxInsertWithOptions} instead
*/
@Deprecated()
public Observable<String> insertWithOptionsObservable(String collection, JsonObject document, WriteOption writeOption) {
io.vertx.rx.java.ObservableFuture<String> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
insertWithOptions(collection, document, writeOption, resultHandler.toHandler());
return resultHandler;
}
Insert a document in the specified collection with the specified write option
This operation might change _id field of document parameter
Params: - collection – the collection
- document – the document
- writeOption – the write option to use
Returns:
/**
* Insert a document in the specified collection with the specified write option
* <p>
* This operation might change <i>_id</i> field of <i>document</i> parameter
* @param collection the collection
* @param document the document
* @param writeOption the write option to use
* @return
*/
public Single<String> rxInsertWithOptions(String collection, JsonObject document, WriteOption writeOption) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
insertWithOptions(collection, document, writeOption, fut);
}));
}
Update matching documents in the specified collection
Params: - collection – the collection
- query – query used to match the documents
- update – used to describe how the documents will be updated
- resultHandler – will be called when complete
Returns:
/**
* Update matching documents in the specified collection
* @param collection the collection
* @param query query used to match the documents
* @param update used to describe how the documents will be updated
* @param resultHandler will be called when complete
* @return
*/
@Deprecated()
public io.vertx.rxjava.ext.mongo.MongoClient update(String collection, JsonObject query, JsonObject update, Handler<AsyncResult<Void>> resultHandler) {
delegate.update(collection, query, update, resultHandler);
return this;
}
Update matching documents in the specified collection
Params: - collection – the collection
- query – query used to match the documents
- update – used to describe how the documents will be updated
Returns: Deprecated: use rxUpdate
instead
/**
* Update matching documents in the specified collection
* @param collection the collection
* @param query query used to match the documents
* @param update used to describe how the documents will be updated
* @return
* @deprecated use {@link #rxUpdate} instead
*/
@Deprecated()
public Observable<Void> updateObservable(String collection, JsonObject query, JsonObject update) {
io.vertx.rx.java.ObservableFuture<Void> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
update(collection, query, update, resultHandler.toHandler());
return resultHandler;
}
Update matching documents in the specified collection
Params: - collection – the collection
- query – query used to match the documents
- update – used to describe how the documents will be updated
Returns:
/**
* Update matching documents in the specified collection
* @param collection the collection
* @param query query used to match the documents
* @param update used to describe how the documents will be updated
* @return
*/
@Deprecated()
public Single<Void> rxUpdate(String collection, JsonObject query, JsonObject update) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
update(collection, query, update, fut);
}));
}
Update matching documents in the specified collection and return the handler with MongoClientUpdateResult result
Params: - collection – the collection
- query – query used to match the documents
- update – used to describe how the documents will be updated
- resultHandler – will be called when complete
Returns:
/**
* Update matching documents in the specified collection and return the handler with MongoClientUpdateResult result
* @param collection the collection
* @param query query used to match the documents
* @param update used to describe how the documents will be updated
* @param resultHandler will be called when complete
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient updateCollection(String collection, JsonObject query, JsonObject update, Handler<AsyncResult<MongoClientUpdateResult>> resultHandler) {
delegate.updateCollection(collection, query, update, resultHandler);
return this;
}
Update matching documents in the specified collection and return the handler with MongoClientUpdateResult result
Params: - collection – the collection
- query – query used to match the documents
- update – used to describe how the documents will be updated
Returns: Deprecated: use rxUpdateCollection
instead
/**
* Update matching documents in the specified collection and return the handler with MongoClientUpdateResult result
* @param collection the collection
* @param query query used to match the documents
* @param update used to describe how the documents will be updated
* @return
* @deprecated use {@link #rxUpdateCollection} instead
*/
@Deprecated()
public Observable<MongoClientUpdateResult> updateCollectionObservable(String collection, JsonObject query, JsonObject update) {
io.vertx.rx.java.ObservableFuture<MongoClientUpdateResult> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
updateCollection(collection, query, update, resultHandler.toHandler());
return resultHandler;
}
Update matching documents in the specified collection and return the handler with MongoClientUpdateResult result
Params: - collection – the collection
- query – query used to match the documents
- update – used to describe how the documents will be updated
Returns:
/**
* Update matching documents in the specified collection and return the handler with MongoClientUpdateResult result
* @param collection the collection
* @param query query used to match the documents
* @param update used to describe how the documents will be updated
* @return
*/
public Single<MongoClientUpdateResult> rxUpdateCollection(String collection, JsonObject query, JsonObject update) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
updateCollection(collection, query, update, fut);
}));
}
Update matching documents in the specified collection, specifying options
Params: - collection – the collection
- query – query used to match the documents
- update – used to describe how the documents will be updated
- options – options to configure the update
- resultHandler – will be called when complete
Returns:
/**
* Update matching documents in the specified collection, specifying options
* @param collection the collection
* @param query query used to match the documents
* @param update used to describe how the documents will be updated
* @param options options to configure the update
* @param resultHandler will be called when complete
* @return
*/
@Deprecated()
public io.vertx.rxjava.ext.mongo.MongoClient updateWithOptions(String collection, JsonObject query, JsonObject update, UpdateOptions options, Handler<AsyncResult<Void>> resultHandler) {
delegate.updateWithOptions(collection, query, update, options, resultHandler);
return this;
}
Update matching documents in the specified collection, specifying options
Params: - collection – the collection
- query – query used to match the documents
- update – used to describe how the documents will be updated
- options – options to configure the update
Returns: Deprecated: use rxUpdateWithOptions
instead
/**
* Update matching documents in the specified collection, specifying options
* @param collection the collection
* @param query query used to match the documents
* @param update used to describe how the documents will be updated
* @param options options to configure the update
* @return
* @deprecated use {@link #rxUpdateWithOptions} instead
*/
@Deprecated()
public Observable<Void> updateWithOptionsObservable(String collection, JsonObject query, JsonObject update, UpdateOptions options) {
io.vertx.rx.java.ObservableFuture<Void> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
updateWithOptions(collection, query, update, options, resultHandler.toHandler());
return resultHandler;
}
Update matching documents in the specified collection, specifying options
Params: - collection – the collection
- query – query used to match the documents
- update – used to describe how the documents will be updated
- options – options to configure the update
Returns:
/**
* Update matching documents in the specified collection, specifying options
* @param collection the collection
* @param query query used to match the documents
* @param update used to describe how the documents will be updated
* @param options options to configure the update
* @return
*/
@Deprecated()
public Single<Void> rxUpdateWithOptions(String collection, JsonObject query, JsonObject update, UpdateOptions options) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
updateWithOptions(collection, query, update, options, fut);
}));
}
Update matching documents in the specified collection, specifying options and return the handler with MongoClientUpdateResult result
Params: - collection – the collection
- query – query used to match the documents
- update – used to describe how the documents will be updated
- options – options to configure the update
- resultHandler – will be called when complete
Returns:
/**
* Update matching documents in the specified collection, specifying options and return the handler with MongoClientUpdateResult result
* @param collection the collection
* @param query query used to match the documents
* @param update used to describe how the documents will be updated
* @param options options to configure the update
* @param resultHandler will be called when complete
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient updateCollectionWithOptions(String collection, JsonObject query, JsonObject update, UpdateOptions options, Handler<AsyncResult<MongoClientUpdateResult>> resultHandler) {
delegate.updateCollectionWithOptions(collection, query, update, options, resultHandler);
return this;
}
Update matching documents in the specified collection, specifying options and return the handler with MongoClientUpdateResult result
Params: - collection – the collection
- query – query used to match the documents
- update – used to describe how the documents will be updated
- options – options to configure the update
Returns: Deprecated: use rxUpdateCollectionWithOptions
instead
/**
* Update matching documents in the specified collection, specifying options and return the handler with MongoClientUpdateResult result
* @param collection the collection
* @param query query used to match the documents
* @param update used to describe how the documents will be updated
* @param options options to configure the update
* @return
* @deprecated use {@link #rxUpdateCollectionWithOptions} instead
*/
@Deprecated()
public Observable<MongoClientUpdateResult> updateCollectionWithOptionsObservable(String collection, JsonObject query, JsonObject update, UpdateOptions options) {
io.vertx.rx.java.ObservableFuture<MongoClientUpdateResult> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
updateCollectionWithOptions(collection, query, update, options, resultHandler.toHandler());
return resultHandler;
}
Update matching documents in the specified collection, specifying options and return the handler with MongoClientUpdateResult result
Params: - collection – the collection
- query – query used to match the documents
- update – used to describe how the documents will be updated
- options – options to configure the update
Returns:
/**
* Update matching documents in the specified collection, specifying options and return the handler with MongoClientUpdateResult result
* @param collection the collection
* @param query query used to match the documents
* @param update used to describe how the documents will be updated
* @param options options to configure the update
* @return
*/
public Single<MongoClientUpdateResult> rxUpdateCollectionWithOptions(String collection, JsonObject query, JsonObject update, UpdateOptions options) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
updateCollectionWithOptions(collection, query, update, options, fut);
}));
}
Replace matching documents in the specified collection
This operation might change _id field of replace parameter
Params: - collection – the collection
- query – query used to match the documents
- replace – all matching documents will be replaced with this
- resultHandler – will be called when complete
Returns:
/**
* Replace matching documents in the specified collection
* <p>
* This operation might change <i>_id</i> field of <i>replace</i> parameter
* @param collection the collection
* @param query query used to match the documents
* @param replace all matching documents will be replaced with this
* @param resultHandler will be called when complete
* @return
*/
@Deprecated()
public io.vertx.rxjava.ext.mongo.MongoClient replace(String collection, JsonObject query, JsonObject replace, Handler<AsyncResult<Void>> resultHandler) {
delegate.replace(collection, query, replace, resultHandler);
return this;
}
Replace matching documents in the specified collection
This operation might change _id field of replace parameter
Params: - collection – the collection
- query – query used to match the documents
- replace – all matching documents will be replaced with this
Returns: Deprecated: use rxReplace
instead
/**
* Replace matching documents in the specified collection
* <p>
* This operation might change <i>_id</i> field of <i>replace</i> parameter
* @param collection the collection
* @param query query used to match the documents
* @param replace all matching documents will be replaced with this
* @return
* @deprecated use {@link #rxReplace} instead
*/
@Deprecated()
public Observable<Void> replaceObservable(String collection, JsonObject query, JsonObject replace) {
io.vertx.rx.java.ObservableFuture<Void> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
replace(collection, query, replace, resultHandler.toHandler());
return resultHandler;
}
Replace matching documents in the specified collection
This operation might change _id field of replace parameter
Params: - collection – the collection
- query – query used to match the documents
- replace – all matching documents will be replaced with this
Returns:
/**
* Replace matching documents in the specified collection
* <p>
* This operation might change <i>_id</i> field of <i>replace</i> parameter
* @param collection the collection
* @param query query used to match the documents
* @param replace all matching documents will be replaced with this
* @return
*/
@Deprecated()
public Single<Void> rxReplace(String collection, JsonObject query, JsonObject replace) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
replace(collection, query, replace, fut);
}));
}
Replace matching documents in the specified collection and return the handler with MongoClientUpdateResult result
Params: - collection – the collection
- query – query used to match the documents
- replace – all matching documents will be replaced with this
- resultHandler – will be called when complete
Returns:
/**
* Replace matching documents in the specified collection and return the handler with MongoClientUpdateResult result
* @param collection the collection
* @param query query used to match the documents
* @param replace all matching documents will be replaced with this
* @param resultHandler will be called when complete
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient replaceDocuments(String collection, JsonObject query, JsonObject replace, Handler<AsyncResult<MongoClientUpdateResult>> resultHandler) {
delegate.replaceDocuments(collection, query, replace, resultHandler);
return this;
}
Replace matching documents in the specified collection and return the handler with MongoClientUpdateResult result
Params: - collection – the collection
- query – query used to match the documents
- replace – all matching documents will be replaced with this
Returns: Deprecated: use rxReplaceDocuments
instead
/**
* Replace matching documents in the specified collection and return the handler with MongoClientUpdateResult result
* @param collection the collection
* @param query query used to match the documents
* @param replace all matching documents will be replaced with this
* @return
* @deprecated use {@link #rxReplaceDocuments} instead
*/
@Deprecated()
public Observable<MongoClientUpdateResult> replaceDocumentsObservable(String collection, JsonObject query, JsonObject replace) {
io.vertx.rx.java.ObservableFuture<MongoClientUpdateResult> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
replaceDocuments(collection, query, replace, resultHandler.toHandler());
return resultHandler;
}
Replace matching documents in the specified collection and return the handler with MongoClientUpdateResult result
Params: - collection – the collection
- query – query used to match the documents
- replace – all matching documents will be replaced with this
Returns:
/**
* Replace matching documents in the specified collection and return the handler with MongoClientUpdateResult result
* @param collection the collection
* @param query query used to match the documents
* @param replace all matching documents will be replaced with this
* @return
*/
public Single<MongoClientUpdateResult> rxReplaceDocuments(String collection, JsonObject query, JsonObject replace) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
replaceDocuments(collection, query, replace, fut);
}));
}
Replace matching documents in the specified collection, specifying options
This operation might change _id field of replace parameter
Params: - collection – the collection
- query – query used to match the documents
- replace – all matching documents will be replaced with this
- options – options to configure the replace
- resultHandler – will be called when complete
Returns:
/**
* Replace matching documents in the specified collection, specifying options
* <p>
* This operation might change <i>_id</i> field of <i>replace</i> parameter
* @param collection the collection
* @param query query used to match the documents
* @param replace all matching documents will be replaced with this
* @param options options to configure the replace
* @param resultHandler will be called when complete
* @return
*/
@Deprecated()
public io.vertx.rxjava.ext.mongo.MongoClient replaceWithOptions(String collection, JsonObject query, JsonObject replace, UpdateOptions options, Handler<AsyncResult<Void>> resultHandler) {
delegate.replaceWithOptions(collection, query, replace, options, resultHandler);
return this;
}
Replace matching documents in the specified collection, specifying options
This operation might change _id field of replace parameter
Params: - collection – the collection
- query – query used to match the documents
- replace – all matching documents will be replaced with this
- options – options to configure the replace
Returns: Deprecated: use rxReplaceWithOptions
instead
/**
* Replace matching documents in the specified collection, specifying options
* <p>
* This operation might change <i>_id</i> field of <i>replace</i> parameter
* @param collection the collection
* @param query query used to match the documents
* @param replace all matching documents will be replaced with this
* @param options options to configure the replace
* @return
* @deprecated use {@link #rxReplaceWithOptions} instead
*/
@Deprecated()
public Observable<Void> replaceWithOptionsObservable(String collection, JsonObject query, JsonObject replace, UpdateOptions options) {
io.vertx.rx.java.ObservableFuture<Void> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
replaceWithOptions(collection, query, replace, options, resultHandler.toHandler());
return resultHandler;
}
Replace matching documents in the specified collection, specifying options
This operation might change _id field of replace parameter
Params: - collection – the collection
- query – query used to match the documents
- replace – all matching documents will be replaced with this
- options – options to configure the replace
Returns:
/**
* Replace matching documents in the specified collection, specifying options
* <p>
* This operation might change <i>_id</i> field of <i>replace</i> parameter
* @param collection the collection
* @param query query used to match the documents
* @param replace all matching documents will be replaced with this
* @param options options to configure the replace
* @return
*/
@Deprecated()
public Single<Void> rxReplaceWithOptions(String collection, JsonObject query, JsonObject replace, UpdateOptions options) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
replaceWithOptions(collection, query, replace, options, fut);
}));
}
Replace matching documents in the specified collection, specifying options and return the handler with MongoClientUpdateResult result
Params: - collection – the collection
- query – query used to match the documents
- replace – all matching documents will be replaced with this
- options – options to configure the replace
- resultHandler – will be called when complete
Returns:
/**
* Replace matching documents in the specified collection, specifying options and return the handler with MongoClientUpdateResult result
* @param collection the collection
* @param query query used to match the documents
* @param replace all matching documents will be replaced with this
* @param options options to configure the replace
* @param resultHandler will be called when complete
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient replaceDocumentsWithOptions(String collection, JsonObject query, JsonObject replace, UpdateOptions options, Handler<AsyncResult<MongoClientUpdateResult>> resultHandler) {
delegate.replaceDocumentsWithOptions(collection, query, replace, options, resultHandler);
return this;
}
Replace matching documents in the specified collection, specifying options and return the handler with MongoClientUpdateResult result
Params: - collection – the collection
- query – query used to match the documents
- replace – all matching documents will be replaced with this
- options – options to configure the replace
Returns: Deprecated: use rxReplaceDocumentsWithOptions
instead
/**
* Replace matching documents in the specified collection, specifying options and return the handler with MongoClientUpdateResult result
* @param collection the collection
* @param query query used to match the documents
* @param replace all matching documents will be replaced with this
* @param options options to configure the replace
* @return
* @deprecated use {@link #rxReplaceDocumentsWithOptions} instead
*/
@Deprecated()
public Observable<MongoClientUpdateResult> replaceDocumentsWithOptionsObservable(String collection, JsonObject query, JsonObject replace, UpdateOptions options) {
io.vertx.rx.java.ObservableFuture<MongoClientUpdateResult> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
replaceDocumentsWithOptions(collection, query, replace, options, resultHandler.toHandler());
return resultHandler;
}
Replace matching documents in the specified collection, specifying options and return the handler with MongoClientUpdateResult result
Params: - collection – the collection
- query – query used to match the documents
- replace – all matching documents will be replaced with this
- options – options to configure the replace
Returns:
/**
* Replace matching documents in the specified collection, specifying options and return the handler with MongoClientUpdateResult result
* @param collection the collection
* @param query query used to match the documents
* @param replace all matching documents will be replaced with this
* @param options options to configure the replace
* @return
*/
public Single<MongoClientUpdateResult> rxReplaceDocumentsWithOptions(String collection, JsonObject query, JsonObject replace, UpdateOptions options) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
replaceDocumentsWithOptions(collection, query, replace, options, fut);
}));
}
Execute a bulk operation. Can insert, update, replace, and/or delete multiple documents with one request.
Params: - collection – the collection
- operations – the operations to execute
- resultHandler – will be called with a
MongoClientBulkWriteResult
when complete
Returns:
/**
* Execute a bulk operation. Can insert, update, replace, and/or delete multiple documents with one request.
* @param collection the collection
* @param operations the operations to execute
* @param resultHandler will be called with a {@link io.vertx.ext.mongo.MongoClientBulkWriteResult} when complete
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient bulkWrite(String collection, List<BulkOperation> operations, Handler<AsyncResult<MongoClientBulkWriteResult>> resultHandler) {
delegate.bulkWrite(collection, operations, resultHandler);
return this;
}
Execute a bulk operation. Can insert, update, replace, and/or delete multiple documents with one request.
Params: - collection – the collection
- operations – the operations to execute
Returns: Deprecated: use rxBulkWrite
instead
/**
* Execute a bulk operation. Can insert, update, replace, and/or delete multiple documents with one request.
* @param collection the collection
* @param operations the operations to execute
* @return
* @deprecated use {@link #rxBulkWrite} instead
*/
@Deprecated()
public Observable<MongoClientBulkWriteResult> bulkWriteObservable(String collection, List<BulkOperation> operations) {
io.vertx.rx.java.ObservableFuture<MongoClientBulkWriteResult> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
bulkWrite(collection, operations, resultHandler.toHandler());
return resultHandler;
}
Execute a bulk operation. Can insert, update, replace, and/or delete multiple documents with one request.
Params: - collection – the collection
- operations – the operations to execute
Returns:
/**
* Execute a bulk operation. Can insert, update, replace, and/or delete multiple documents with one request.
* @param collection the collection
* @param operations the operations to execute
* @return
*/
public Single<MongoClientBulkWriteResult> rxBulkWrite(String collection, List<BulkOperation> operations) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
bulkWrite(collection, operations, fut);
}));
}
Execute a bulk operation with the specified write options. Can insert, update, replace, and/or delete multiple
documents with one request.
Params: - collection – the collection
- operations – the operations to execute
- bulkWriteOptions – the write options
- resultHandler – will be called with a
MongoClientBulkWriteResult
when complete
Returns:
/**
* Execute a bulk operation with the specified write options. Can insert, update, replace, and/or delete multiple
* documents with one request.
* @param collection the collection
* @param operations the operations to execute
* @param bulkWriteOptions the write options
* @param resultHandler will be called with a {@link io.vertx.ext.mongo.MongoClientBulkWriteResult} when complete
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient bulkWriteWithOptions(String collection, List<BulkOperation> operations, BulkWriteOptions bulkWriteOptions, Handler<AsyncResult<MongoClientBulkWriteResult>> resultHandler) {
delegate.bulkWriteWithOptions(collection, operations, bulkWriteOptions, resultHandler);
return this;
}
Execute a bulk operation with the specified write options. Can insert, update, replace, and/or delete multiple
documents with one request.
Params: - collection – the collection
- operations – the operations to execute
- bulkWriteOptions – the write options
Returns: Deprecated: use rxBulkWriteWithOptions
instead
/**
* Execute a bulk operation with the specified write options. Can insert, update, replace, and/or delete multiple
* documents with one request.
* @param collection the collection
* @param operations the operations to execute
* @param bulkWriteOptions the write options
* @return
* @deprecated use {@link #rxBulkWriteWithOptions} instead
*/
@Deprecated()
public Observable<MongoClientBulkWriteResult> bulkWriteWithOptionsObservable(String collection, List<BulkOperation> operations, BulkWriteOptions bulkWriteOptions) {
io.vertx.rx.java.ObservableFuture<MongoClientBulkWriteResult> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
bulkWriteWithOptions(collection, operations, bulkWriteOptions, resultHandler.toHandler());
return resultHandler;
}
Execute a bulk operation with the specified write options. Can insert, update, replace, and/or delete multiple
documents with one request.
Params: - collection – the collection
- operations – the operations to execute
- bulkWriteOptions – the write options
Returns:
/**
* Execute a bulk operation with the specified write options. Can insert, update, replace, and/or delete multiple
* documents with one request.
* @param collection the collection
* @param operations the operations to execute
* @param bulkWriteOptions the write options
* @return
*/
public Single<MongoClientBulkWriteResult> rxBulkWriteWithOptions(String collection, List<BulkOperation> operations, BulkWriteOptions bulkWriteOptions) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
bulkWriteWithOptions(collection, operations, bulkWriteOptions, fut);
}));
}
Find matching documents in the specified collection
Params: - collection – the collection
- query – query used to match documents
- resultHandler – will be provided with list of documents
Returns:
/**
* Find matching documents in the specified collection
* @param collection the collection
* @param query query used to match documents
* @param resultHandler will be provided with list of documents
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient find(String collection, JsonObject query, Handler<AsyncResult<List<JsonObject>>> resultHandler) {
delegate.find(collection, query, resultHandler);
return this;
}
Find matching documents in the specified collection
Params: - collection – the collection
- query – query used to match documents
Returns: Deprecated: use rxFind
instead
/**
* Find matching documents in the specified collection
* @param collection the collection
* @param query query used to match documents
* @return
* @deprecated use {@link #rxFind} instead
*/
@Deprecated()
public Observable<List<JsonObject>> findObservable(String collection, JsonObject query) {
io.vertx.rx.java.ObservableFuture<List<JsonObject>> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
find(collection, query, resultHandler.toHandler());
return resultHandler;
}
Find matching documents in the specified collection
Params: - collection – the collection
- query – query used to match documents
Returns:
/**
* Find matching documents in the specified collection
* @param collection the collection
* @param query query used to match documents
* @return
*/
public Single<List<JsonObject>> rxFind(String collection, JsonObject query) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
find(collection, query, fut);
}));
}
Find matching documents in the specified collection.
This method use batchCursor for returning each found document.
Params: - collection – the collection
- query – query used to match documents
Returns: a emitting found documents
/**
* Find matching documents in the specified collection.
* This method use batchCursor for returning each found document.
* @param collection the collection
* @param query query used to match documents
* @return a emitting found documents
*/
public io.vertx.rxjava.core.streams.ReadStream<JsonObject> findBatch(String collection, JsonObject query) {
io.vertx.rxjava.core.streams.ReadStream<JsonObject> ret = io.vertx.rxjava.core.streams.ReadStream.newInstance(delegate.findBatch(collection, query), io.vertx.lang.rx.TypeArg.unknown());
return ret;
}
Find matching documents in the specified collection, specifying options
Params: - collection – the collection
- query – query used to match documents
- options – options to configure the find
- resultHandler – will be provided with list of documents
Returns:
/**
* Find matching documents in the specified collection, specifying options
* @param collection the collection
* @param query query used to match documents
* @param options options to configure the find
* @param resultHandler will be provided with list of documents
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient findWithOptions(String collection, JsonObject query, FindOptions options, Handler<AsyncResult<List<JsonObject>>> resultHandler) {
delegate.findWithOptions(collection, query, options, resultHandler);
return this;
}
Find matching documents in the specified collection, specifying options
Params: - collection – the collection
- query – query used to match documents
- options – options to configure the find
Returns: Deprecated: use rxFindWithOptions
instead
/**
* Find matching documents in the specified collection, specifying options
* @param collection the collection
* @param query query used to match documents
* @param options options to configure the find
* @return
* @deprecated use {@link #rxFindWithOptions} instead
*/
@Deprecated()
public Observable<List<JsonObject>> findWithOptionsObservable(String collection, JsonObject query, FindOptions options) {
io.vertx.rx.java.ObservableFuture<List<JsonObject>> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
findWithOptions(collection, query, options, resultHandler.toHandler());
return resultHandler;
}
Find matching documents in the specified collection, specifying options
Params: - collection – the collection
- query – query used to match documents
- options – options to configure the find
Returns:
/**
* Find matching documents in the specified collection, specifying options
* @param collection the collection
* @param query query used to match documents
* @param options options to configure the find
* @return
*/
public Single<List<JsonObject>> rxFindWithOptions(String collection, JsonObject query, FindOptions options) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
findWithOptions(collection, query, options, fut);
}));
}
Find matching documents in the specified collection, specifying options.
This method use batchCursor for returning each found document.
Params: - collection – the collection
- query – query used to match documents
- options – options to configure the find
Returns: a emitting found documents
/**
* Find matching documents in the specified collection, specifying options.
* This method use batchCursor for returning each found document.
* @param collection the collection
* @param query query used to match documents
* @param options options to configure the find
* @return a emitting found documents
*/
public io.vertx.rxjava.core.streams.ReadStream<JsonObject> findBatchWithOptions(String collection, JsonObject query, FindOptions options) {
io.vertx.rxjava.core.streams.ReadStream<JsonObject> ret = io.vertx.rxjava.core.streams.ReadStream.newInstance(delegate.findBatchWithOptions(collection, query, options), io.vertx.lang.rx.TypeArg.unknown());
return ret;
}
Find a single matching document in the specified collection
This operation might change _id field of query parameter
Params: - collection – the collection
- query – the query used to match the document
- fields – the fields
- resultHandler – will be provided with the document, if any
Returns:
/**
* Find a single matching document in the specified collection
* <p>
* This operation might change <i>_id</i> field of <i>query</i> parameter
* @param collection the collection
* @param query the query used to match the document
* @param fields the fields
* @param resultHandler will be provided with the document, if any
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient findOne(String collection, JsonObject query, JsonObject fields, Handler<AsyncResult<JsonObject>> resultHandler) {
delegate.findOne(collection, query, fields, resultHandler);
return this;
}
Find a single matching document in the specified collection
This operation might change _id field of query parameter
Params: - collection – the collection
- query – the query used to match the document
- fields – the fields
Returns: Deprecated: use rxFindOne
instead
/**
* Find a single matching document in the specified collection
* <p>
* This operation might change <i>_id</i> field of <i>query</i> parameter
* @param collection the collection
* @param query the query used to match the document
* @param fields the fields
* @return
* @deprecated use {@link #rxFindOne} instead
*/
@Deprecated()
public Observable<JsonObject> findOneObservable(String collection, JsonObject query, JsonObject fields) {
io.vertx.rx.java.ObservableFuture<JsonObject> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
findOne(collection, query, fields, resultHandler.toHandler());
return resultHandler;
}
Find a single matching document in the specified collection
This operation might change _id field of query parameter
Params: - collection – the collection
- query – the query used to match the document
- fields – the fields
Returns:
/**
* Find a single matching document in the specified collection
* <p>
* This operation might change <i>_id</i> field of <i>query</i> parameter
* @param collection the collection
* @param query the query used to match the document
* @param fields the fields
* @return
*/
public Single<JsonObject> rxFindOne(String collection, JsonObject query, JsonObject fields) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
findOne(collection, query, fields, fut);
}));
}
Find a single matching document in the specified collection and update it.
This operation might change _id field of query parameter
Params: - collection – the collection
- query – the query used to match the document
- update – used to describe how the documents will be updated
- resultHandler – will be provided with the document, if any
Returns:
/**
* Find a single matching document in the specified collection and update it.
* <p>
* This operation might change <i>_id</i> field of <i>query</i> parameter
* @param collection the collection
* @param query the query used to match the document
* @param update used to describe how the documents will be updated
* @param resultHandler will be provided with the document, if any
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient findOneAndUpdate(String collection, JsonObject query, JsonObject update, Handler<AsyncResult<JsonObject>> resultHandler) {
delegate.findOneAndUpdate(collection, query, update, resultHandler);
return this;
}
Find a single matching document in the specified collection and update it.
This operation might change _id field of query parameter
Params: - collection – the collection
- query – the query used to match the document
- update – used to describe how the documents will be updated
Returns: Deprecated: use rxFindOneAndUpdate
instead
/**
* Find a single matching document in the specified collection and update it.
* <p>
* This operation might change <i>_id</i> field of <i>query</i> parameter
* @param collection the collection
* @param query the query used to match the document
* @param update used to describe how the documents will be updated
* @return
* @deprecated use {@link #rxFindOneAndUpdate} instead
*/
@Deprecated()
public Observable<JsonObject> findOneAndUpdateObservable(String collection, JsonObject query, JsonObject update) {
io.vertx.rx.java.ObservableFuture<JsonObject> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
findOneAndUpdate(collection, query, update, resultHandler.toHandler());
return resultHandler;
}
Find a single matching document in the specified collection and update it.
This operation might change _id field of query parameter
Params: - collection – the collection
- query – the query used to match the document
- update – used to describe how the documents will be updated
Returns:
/**
* Find a single matching document in the specified collection and update it.
* <p>
* This operation might change <i>_id</i> field of <i>query</i> parameter
* @param collection the collection
* @param query the query used to match the document
* @param update used to describe how the documents will be updated
* @return
*/
public Single<JsonObject> rxFindOneAndUpdate(String collection, JsonObject query, JsonObject update) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
findOneAndUpdate(collection, query, update, fut);
}));
}
Find a single matching document in the specified collection and update it.
This operation might change _id field of query parameter
Params: - collection – the collection
- query – the query used to match the document
- update – used to describe how the documents will be updated
- findOptions – options to configure the find
- updateOptions – options to configure the update
- resultHandler – will be provided with the document, if any
Returns:
/**
* Find a single matching document in the specified collection and update it.
* <p>
* This operation might change <i>_id</i> field of <i>query</i> parameter
* @param collection the collection
* @param query the query used to match the document
* @param update used to describe how the documents will be updated
* @param findOptions options to configure the find
* @param updateOptions options to configure the update
* @param resultHandler will be provided with the document, if any
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient findOneAndUpdateWithOptions(String collection, JsonObject query, JsonObject update, FindOptions findOptions, UpdateOptions updateOptions, Handler<AsyncResult<JsonObject>> resultHandler) {
delegate.findOneAndUpdateWithOptions(collection, query, update, findOptions, updateOptions, resultHandler);
return this;
}
Find a single matching document in the specified collection and update it.
This operation might change _id field of query parameter
Params: - collection – the collection
- query – the query used to match the document
- update – used to describe how the documents will be updated
- findOptions – options to configure the find
- updateOptions – options to configure the update
Returns: Deprecated: use rxFindOneAndUpdateWithOptions
instead
/**
* Find a single matching document in the specified collection and update it.
* <p>
* This operation might change <i>_id</i> field of <i>query</i> parameter
* @param collection the collection
* @param query the query used to match the document
* @param update used to describe how the documents will be updated
* @param findOptions options to configure the find
* @param updateOptions options to configure the update
* @return
* @deprecated use {@link #rxFindOneAndUpdateWithOptions} instead
*/
@Deprecated()
public Observable<JsonObject> findOneAndUpdateWithOptionsObservable(String collection, JsonObject query, JsonObject update, FindOptions findOptions, UpdateOptions updateOptions) {
io.vertx.rx.java.ObservableFuture<JsonObject> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
findOneAndUpdateWithOptions(collection, query, update, findOptions, updateOptions, resultHandler.toHandler());
return resultHandler;
}
Find a single matching document in the specified collection and update it.
This operation might change _id field of query parameter
Params: - collection – the collection
- query – the query used to match the document
- update – used to describe how the documents will be updated
- findOptions – options to configure the find
- updateOptions – options to configure the update
Returns:
/**
* Find a single matching document in the specified collection and update it.
* <p>
* This operation might change <i>_id</i> field of <i>query</i> parameter
* @param collection the collection
* @param query the query used to match the document
* @param update used to describe how the documents will be updated
* @param findOptions options to configure the find
* @param updateOptions options to configure the update
* @return
*/
public Single<JsonObject> rxFindOneAndUpdateWithOptions(String collection, JsonObject query, JsonObject update, FindOptions findOptions, UpdateOptions updateOptions) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
findOneAndUpdateWithOptions(collection, query, update, findOptions, updateOptions, fut);
}));
}
Find a single matching document in the specified collection and replace it.
This operation might change _id field of query parameter
Params: - collection – the collection
- query – the query used to match the document
- replace – the replacement document
- resultHandler – will be provided with the document, if any
Returns:
/**
* Find a single matching document in the specified collection and replace it.
* <p>
* This operation might change <i>_id</i> field of <i>query</i> parameter
* @param collection the collection
* @param query the query used to match the document
* @param replace the replacement document
* @param resultHandler will be provided with the document, if any
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient findOneAndReplace(String collection, JsonObject query, JsonObject replace, Handler<AsyncResult<JsonObject>> resultHandler) {
delegate.findOneAndReplace(collection, query, replace, resultHandler);
return this;
}
Find a single matching document in the specified collection and replace it.
This operation might change _id field of query parameter
Params: - collection – the collection
- query – the query used to match the document
- replace – the replacement document
Returns: Deprecated: use rxFindOneAndReplace
instead
/**
* Find a single matching document in the specified collection and replace it.
* <p>
* This operation might change <i>_id</i> field of <i>query</i> parameter
* @param collection the collection
* @param query the query used to match the document
* @param replace the replacement document
* @return
* @deprecated use {@link #rxFindOneAndReplace} instead
*/
@Deprecated()
public Observable<JsonObject> findOneAndReplaceObservable(String collection, JsonObject query, JsonObject replace) {
io.vertx.rx.java.ObservableFuture<JsonObject> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
findOneAndReplace(collection, query, replace, resultHandler.toHandler());
return resultHandler;
}
Find a single matching document in the specified collection and replace it.
This operation might change _id field of query parameter
Params: - collection – the collection
- query – the query used to match the document
- replace – the replacement document
Returns:
/**
* Find a single matching document in the specified collection and replace it.
* <p>
* This operation might change <i>_id</i> field of <i>query</i> parameter
* @param collection the collection
* @param query the query used to match the document
* @param replace the replacement document
* @return
*/
public Single<JsonObject> rxFindOneAndReplace(String collection, JsonObject query, JsonObject replace) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
findOneAndReplace(collection, query, replace, fut);
}));
}
Find a single matching document in the specified collection and replace it.
This operation might change _id field of query parameter
Params: - collection – the collection
- query – the query used to match the document
- replace – the replacement document
- findOptions – options to configure the find
- updateOptions – options to configure the update
- resultHandler – will be provided with the document, if any
Returns:
/**
* Find a single matching document in the specified collection and replace it.
* <p>
* This operation might change <i>_id</i> field of <i>query</i> parameter
* @param collection the collection
* @param query the query used to match the document
* @param replace the replacement document
* @param findOptions options to configure the find
* @param updateOptions options to configure the update
* @param resultHandler will be provided with the document, if any
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient findOneAndReplaceWithOptions(String collection, JsonObject query, JsonObject replace, FindOptions findOptions, UpdateOptions updateOptions, Handler<AsyncResult<JsonObject>> resultHandler) {
delegate.findOneAndReplaceWithOptions(collection, query, replace, findOptions, updateOptions, resultHandler);
return this;
}
Find a single matching document in the specified collection and replace it.
This operation might change _id field of query parameter
Params: - collection – the collection
- query – the query used to match the document
- replace – the replacement document
- findOptions – options to configure the find
- updateOptions – options to configure the update
Returns: Deprecated: use rxFindOneAndReplaceWithOptions
instead
/**
* Find a single matching document in the specified collection and replace it.
* <p>
* This operation might change <i>_id</i> field of <i>query</i> parameter
* @param collection the collection
* @param query the query used to match the document
* @param replace the replacement document
* @param findOptions options to configure the find
* @param updateOptions options to configure the update
* @return
* @deprecated use {@link #rxFindOneAndReplaceWithOptions} instead
*/
@Deprecated()
public Observable<JsonObject> findOneAndReplaceWithOptionsObservable(String collection, JsonObject query, JsonObject replace, FindOptions findOptions, UpdateOptions updateOptions) {
io.vertx.rx.java.ObservableFuture<JsonObject> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
findOneAndReplaceWithOptions(collection, query, replace, findOptions, updateOptions, resultHandler.toHandler());
return resultHandler;
}
Find a single matching document in the specified collection and replace it.
This operation might change _id field of query parameter
Params: - collection – the collection
- query – the query used to match the document
- replace – the replacement document
- findOptions – options to configure the find
- updateOptions – options to configure the update
Returns:
/**
* Find a single matching document in the specified collection and replace it.
* <p>
* This operation might change <i>_id</i> field of <i>query</i> parameter
* @param collection the collection
* @param query the query used to match the document
* @param replace the replacement document
* @param findOptions options to configure the find
* @param updateOptions options to configure the update
* @return
*/
public Single<JsonObject> rxFindOneAndReplaceWithOptions(String collection, JsonObject query, JsonObject replace, FindOptions findOptions, UpdateOptions updateOptions) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
findOneAndReplaceWithOptions(collection, query, replace, findOptions, updateOptions, fut);
}));
}
Find a single matching document in the specified collection and delete it.
This operation might change _id field of query parameter
Params: - collection – the collection
- query – the query used to match the document
- resultHandler – will be provided with the deleted document, if any
Returns:
/**
* Find a single matching document in the specified collection and delete it.
* <p>
* This operation might change <i>_id</i> field of <i>query</i> parameter
* @param collection the collection
* @param query the query used to match the document
* @param resultHandler will be provided with the deleted document, if any
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient findOneAndDelete(String collection, JsonObject query, Handler<AsyncResult<JsonObject>> resultHandler) {
delegate.findOneAndDelete(collection, query, resultHandler);
return this;
}
Find a single matching document in the specified collection and delete it.
This operation might change _id field of query parameter
Params: - collection – the collection
- query – the query used to match the document
Returns: Deprecated: use rxFindOneAndDelete
instead
/**
* Find a single matching document in the specified collection and delete it.
* <p>
* This operation might change <i>_id</i> field of <i>query</i> parameter
* @param collection the collection
* @param query the query used to match the document
* @return
* @deprecated use {@link #rxFindOneAndDelete} instead
*/
@Deprecated()
public Observable<JsonObject> findOneAndDeleteObservable(String collection, JsonObject query) {
io.vertx.rx.java.ObservableFuture<JsonObject> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
findOneAndDelete(collection, query, resultHandler.toHandler());
return resultHandler;
}
Find a single matching document in the specified collection and delete it.
This operation might change _id field of query parameter
Params: - collection – the collection
- query – the query used to match the document
Returns:
/**
* Find a single matching document in the specified collection and delete it.
* <p>
* This operation might change <i>_id</i> field of <i>query</i> parameter
* @param collection the collection
* @param query the query used to match the document
* @return
*/
public Single<JsonObject> rxFindOneAndDelete(String collection, JsonObject query) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
findOneAndDelete(collection, query, fut);
}));
}
Find a single matching document in the specified collection and delete it.
This operation might change _id field of query parameter
Params: - collection – the collection
- query – the query used to match the document
- findOptions – options to configure the find
- resultHandler – will be provided with the deleted document, if any
Returns:
/**
* Find a single matching document in the specified collection and delete it.
* <p>
* This operation might change <i>_id</i> field of <i>query</i> parameter
* @param collection the collection
* @param query the query used to match the document
* @param findOptions options to configure the find
* @param resultHandler will be provided with the deleted document, if any
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient findOneAndDeleteWithOptions(String collection, JsonObject query, FindOptions findOptions, Handler<AsyncResult<JsonObject>> resultHandler) {
delegate.findOneAndDeleteWithOptions(collection, query, findOptions, resultHandler);
return this;
}
Find a single matching document in the specified collection and delete it.
This operation might change _id field of query parameter
Params: - collection – the collection
- query – the query used to match the document
- findOptions – options to configure the find
Returns: Deprecated: use rxFindOneAndDeleteWithOptions
instead
/**
* Find a single matching document in the specified collection and delete it.
* <p>
* This operation might change <i>_id</i> field of <i>query</i> parameter
* @param collection the collection
* @param query the query used to match the document
* @param findOptions options to configure the find
* @return
* @deprecated use {@link #rxFindOneAndDeleteWithOptions} instead
*/
@Deprecated()
public Observable<JsonObject> findOneAndDeleteWithOptionsObservable(String collection, JsonObject query, FindOptions findOptions) {
io.vertx.rx.java.ObservableFuture<JsonObject> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
findOneAndDeleteWithOptions(collection, query, findOptions, resultHandler.toHandler());
return resultHandler;
}
Find a single matching document in the specified collection and delete it.
This operation might change _id field of query parameter
Params: - collection – the collection
- query – the query used to match the document
- findOptions – options to configure the find
Returns:
/**
* Find a single matching document in the specified collection and delete it.
* <p>
* This operation might change <i>_id</i> field of <i>query</i> parameter
* @param collection the collection
* @param query the query used to match the document
* @param findOptions options to configure the find
* @return
*/
public Single<JsonObject> rxFindOneAndDeleteWithOptions(String collection, JsonObject query, FindOptions findOptions) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
findOneAndDeleteWithOptions(collection, query, findOptions, fut);
}));
}
Count matching documents in a collection.
Params: - collection – the collection
- query – query used to match documents
- resultHandler – will be provided with the number of matching documents
Returns:
/**
* Count matching documents in a collection.
* @param collection the collection
* @param query query used to match documents
* @param resultHandler will be provided with the number of matching documents
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient count(String collection, JsonObject query, Handler<AsyncResult<Long>> resultHandler) {
delegate.count(collection, query, resultHandler);
return this;
}
Count matching documents in a collection.
Params: - collection – the collection
- query – query used to match documents
Returns: Deprecated: use rxCount
instead
/**
* Count matching documents in a collection.
* @param collection the collection
* @param query query used to match documents
* @return
* @deprecated use {@link #rxCount} instead
*/
@Deprecated()
public Observable<Long> countObservable(String collection, JsonObject query) {
io.vertx.rx.java.ObservableFuture<Long> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
count(collection, query, resultHandler.toHandler());
return resultHandler;
}
Count matching documents in a collection.
Params: - collection – the collection
- query – query used to match documents
Returns:
/**
* Count matching documents in a collection.
* @param collection the collection
* @param query query used to match documents
* @return
*/
public Single<Long> rxCount(String collection, JsonObject query) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
count(collection, query, fut);
}));
}
Remove matching documents from a collection
Params: - collection – the collection
- query – query used to match documents
- resultHandler – will be called when complete
Returns:
/**
* Remove matching documents from a collection
* @param collection the collection
* @param query query used to match documents
* @param resultHandler will be called when complete
* @return
*/
@Deprecated()
public io.vertx.rxjava.ext.mongo.MongoClient remove(String collection, JsonObject query, Handler<AsyncResult<Void>> resultHandler) {
delegate.remove(collection, query, resultHandler);
return this;
}
Remove matching documents from a collection
Params: - collection – the collection
- query – query used to match documents
Returns: Deprecated: use rxRemove
instead
/**
* Remove matching documents from a collection
* @param collection the collection
* @param query query used to match documents
* @return
* @deprecated use {@link #rxRemove} instead
*/
@Deprecated()
public Observable<Void> removeObservable(String collection, JsonObject query) {
io.vertx.rx.java.ObservableFuture<Void> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
remove(collection, query, resultHandler.toHandler());
return resultHandler;
}
Remove matching documents from a collection
Params: - collection – the collection
- query – query used to match documents
Returns:
/**
* Remove matching documents from a collection
* @param collection the collection
* @param query query used to match documents
* @return
*/
@Deprecated()
public Single<Void> rxRemove(String collection, JsonObject query) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
remove(collection, query, fut);
}));
}
Remove matching documents from a collection and return the handler with MongoClientDeleteResult result
Params: - collection – the collection
- query – query used to match documents
- resultHandler – will be called when complete
Returns:
/**
* Remove matching documents from a collection and return the handler with MongoClientDeleteResult result
* @param collection the collection
* @param query query used to match documents
* @param resultHandler will be called when complete
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient removeDocuments(String collection, JsonObject query, Handler<AsyncResult<MongoClientDeleteResult>> resultHandler) {
delegate.removeDocuments(collection, query, resultHandler);
return this;
}
Remove matching documents from a collection and return the handler with MongoClientDeleteResult result
Params: - collection – the collection
- query – query used to match documents
Returns: Deprecated: use rxRemoveDocuments
instead
/**
* Remove matching documents from a collection and return the handler with MongoClientDeleteResult result
* @param collection the collection
* @param query query used to match documents
* @return
* @deprecated use {@link #rxRemoveDocuments} instead
*/
@Deprecated()
public Observable<MongoClientDeleteResult> removeDocumentsObservable(String collection, JsonObject query) {
io.vertx.rx.java.ObservableFuture<MongoClientDeleteResult> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
removeDocuments(collection, query, resultHandler.toHandler());
return resultHandler;
}
Remove matching documents from a collection and return the handler with MongoClientDeleteResult result
Params: - collection – the collection
- query – query used to match documents
Returns:
/**
* Remove matching documents from a collection and return the handler with MongoClientDeleteResult result
* @param collection the collection
* @param query query used to match documents
* @return
*/
public Single<MongoClientDeleteResult> rxRemoveDocuments(String collection, JsonObject query) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
removeDocuments(collection, query, fut);
}));
}
Remove matching documents from a collection with the specified write option
Params: - collection – the collection
- query – query used to match documents
- writeOption – the write option to use
- resultHandler – will be called when complete
Returns:
/**
* Remove matching documents from a collection with the specified write option
* @param collection the collection
* @param query query used to match documents
* @param writeOption the write option to use
* @param resultHandler will be called when complete
* @return
*/
@Deprecated()
public io.vertx.rxjava.ext.mongo.MongoClient removeWithOptions(String collection, JsonObject query, WriteOption writeOption, Handler<AsyncResult<Void>> resultHandler) {
delegate.removeWithOptions(collection, query, writeOption, resultHandler);
return this;
}
Remove matching documents from a collection with the specified write option
Params: - collection – the collection
- query – query used to match documents
- writeOption – the write option to use
Returns: Deprecated: use rxRemoveWithOptions
instead
/**
* Remove matching documents from a collection with the specified write option
* @param collection the collection
* @param query query used to match documents
* @param writeOption the write option to use
* @return
* @deprecated use {@link #rxRemoveWithOptions} instead
*/
@Deprecated()
public Observable<Void> removeWithOptionsObservable(String collection, JsonObject query, WriteOption writeOption) {
io.vertx.rx.java.ObservableFuture<Void> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
removeWithOptions(collection, query, writeOption, resultHandler.toHandler());
return resultHandler;
}
Remove matching documents from a collection with the specified write option
Params: - collection – the collection
- query – query used to match documents
- writeOption – the write option to use
Returns:
/**
* Remove matching documents from a collection with the specified write option
* @param collection the collection
* @param query query used to match documents
* @param writeOption the write option to use
* @return
*/
@Deprecated()
public Single<Void> rxRemoveWithOptions(String collection, JsonObject query, WriteOption writeOption) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
removeWithOptions(collection, query, writeOption, fut);
}));
}
Remove matching documents from a collection with the specified write option and return the handler with MongoClientDeleteResult result
Params: - collection – the collection
- query – query used to match documents
- writeOption – the write option to use
- resultHandler – will be called when complete
Returns:
/**
* Remove matching documents from a collection with the specified write option and return the handler with MongoClientDeleteResult result
* @param collection the collection
* @param query query used to match documents
* @param writeOption the write option to use
* @param resultHandler will be called when complete
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient removeDocumentsWithOptions(String collection, JsonObject query, WriteOption writeOption, Handler<AsyncResult<MongoClientDeleteResult>> resultHandler) {
delegate.removeDocumentsWithOptions(collection, query, writeOption, resultHandler);
return this;
}
Remove matching documents from a collection with the specified write option and return the handler with MongoClientDeleteResult result
Params: - collection – the collection
- query – query used to match documents
- writeOption – the write option to use
Returns: Deprecated: use rxRemoveDocumentsWithOptions
instead
/**
* Remove matching documents from a collection with the specified write option and return the handler with MongoClientDeleteResult result
* @param collection the collection
* @param query query used to match documents
* @param writeOption the write option to use
* @return
* @deprecated use {@link #rxRemoveDocumentsWithOptions} instead
*/
@Deprecated()
public Observable<MongoClientDeleteResult> removeDocumentsWithOptionsObservable(String collection, JsonObject query, WriteOption writeOption) {
io.vertx.rx.java.ObservableFuture<MongoClientDeleteResult> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
removeDocumentsWithOptions(collection, query, writeOption, resultHandler.toHandler());
return resultHandler;
}
Remove matching documents from a collection with the specified write option and return the handler with MongoClientDeleteResult result
Params: - collection – the collection
- query – query used to match documents
- writeOption – the write option to use
Returns:
/**
* Remove matching documents from a collection with the specified write option and return the handler with MongoClientDeleteResult result
* @param collection the collection
* @param query query used to match documents
* @param writeOption the write option to use
* @return
*/
public Single<MongoClientDeleteResult> rxRemoveDocumentsWithOptions(String collection, JsonObject query, WriteOption writeOption) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
removeDocumentsWithOptions(collection, query, writeOption, fut);
}));
}
Remove a single matching document from a collection
Params: - collection – the collection
- query – query used to match document
- resultHandler – will be called when complete
Returns:
/**
* Remove a single matching document from a collection
* @param collection the collection
* @param query query used to match document
* @param resultHandler will be called when complete
* @return
*/
@Deprecated()
public io.vertx.rxjava.ext.mongo.MongoClient removeOne(String collection, JsonObject query, Handler<AsyncResult<Void>> resultHandler) {
delegate.removeOne(collection, query, resultHandler);
return this;
}
Remove a single matching document from a collection
Params: - collection – the collection
- query – query used to match document
Returns: Deprecated: use rxRemoveOne
instead
/**
* Remove a single matching document from a collection
* @param collection the collection
* @param query query used to match document
* @return
* @deprecated use {@link #rxRemoveOne} instead
*/
@Deprecated()
public Observable<Void> removeOneObservable(String collection, JsonObject query) {
io.vertx.rx.java.ObservableFuture<Void> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
removeOne(collection, query, resultHandler.toHandler());
return resultHandler;
}
Remove a single matching document from a collection
Params: - collection – the collection
- query – query used to match document
Returns:
/**
* Remove a single matching document from a collection
* @param collection the collection
* @param query query used to match document
* @return
*/
@Deprecated()
public Single<Void> rxRemoveOne(String collection, JsonObject query) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
removeOne(collection, query, fut);
}));
}
Remove a single matching document from a collection and return the handler with MongoClientDeleteResult result
Params: - collection – the collection
- query – query used to match document
- resultHandler – will be called when complete
Returns:
/**
* Remove a single matching document from a collection and return the handler with MongoClientDeleteResult result
* @param collection the collection
* @param query query used to match document
* @param resultHandler will be called when complete
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient removeDocument(String collection, JsonObject query, Handler<AsyncResult<MongoClientDeleteResult>> resultHandler) {
delegate.removeDocument(collection, query, resultHandler);
return this;
}
Remove a single matching document from a collection and return the handler with MongoClientDeleteResult result
Params: - collection – the collection
- query – query used to match document
Returns: Deprecated: use rxRemoveDocument
instead
/**
* Remove a single matching document from a collection and return the handler with MongoClientDeleteResult result
* @param collection the collection
* @param query query used to match document
* @return
* @deprecated use {@link #rxRemoveDocument} instead
*/
@Deprecated()
public Observable<MongoClientDeleteResult> removeDocumentObservable(String collection, JsonObject query) {
io.vertx.rx.java.ObservableFuture<MongoClientDeleteResult> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
removeDocument(collection, query, resultHandler.toHandler());
return resultHandler;
}
Remove a single matching document from a collection and return the handler with MongoClientDeleteResult result
Params: - collection – the collection
- query – query used to match document
Returns:
/**
* Remove a single matching document from a collection and return the handler with MongoClientDeleteResult result
* @param collection the collection
* @param query query used to match document
* @return
*/
public Single<MongoClientDeleteResult> rxRemoveDocument(String collection, JsonObject query) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
removeDocument(collection, query, fut);
}));
}
Remove a single matching document from a collection with the specified write option
Params: - collection – the collection
- query – query used to match document
- writeOption – the write option to use
- resultHandler – will be called when complete
Returns:
/**
* Remove a single matching document from a collection with the specified write option
* @param collection the collection
* @param query query used to match document
* @param writeOption the write option to use
* @param resultHandler will be called when complete
* @return
*/
@Deprecated()
public io.vertx.rxjava.ext.mongo.MongoClient removeOneWithOptions(String collection, JsonObject query, WriteOption writeOption, Handler<AsyncResult<Void>> resultHandler) {
delegate.removeOneWithOptions(collection, query, writeOption, resultHandler);
return this;
}
Remove a single matching document from a collection with the specified write option
Params: - collection – the collection
- query – query used to match document
- writeOption – the write option to use
Returns: Deprecated: use rxRemoveOneWithOptions
instead
/**
* Remove a single matching document from a collection with the specified write option
* @param collection the collection
* @param query query used to match document
* @param writeOption the write option to use
* @return
* @deprecated use {@link #rxRemoveOneWithOptions} instead
*/
@Deprecated()
public Observable<Void> removeOneWithOptionsObservable(String collection, JsonObject query, WriteOption writeOption) {
io.vertx.rx.java.ObservableFuture<Void> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
removeOneWithOptions(collection, query, writeOption, resultHandler.toHandler());
return resultHandler;
}
Remove a single matching document from a collection with the specified write option
Params: - collection – the collection
- query – query used to match document
- writeOption – the write option to use
Returns:
/**
* Remove a single matching document from a collection with the specified write option
* @param collection the collection
* @param query query used to match document
* @param writeOption the write option to use
* @return
*/
@Deprecated()
public Single<Void> rxRemoveOneWithOptions(String collection, JsonObject query, WriteOption writeOption) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
removeOneWithOptions(collection, query, writeOption, fut);
}));
}
Remove a single matching document from a collection with the specified write option and return the handler with MongoClientDeleteResult result
Params: - collection – the collection
- query – query used to match document
- writeOption – the write option to use
- resultHandler – will be called when complete
Returns:
/**
* Remove a single matching document from a collection with the specified write option and return the handler with MongoClientDeleteResult result
* @param collection the collection
* @param query query used to match document
* @param writeOption the write option to use
* @param resultHandler will be called when complete
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient removeDocumentWithOptions(String collection, JsonObject query, WriteOption writeOption, Handler<AsyncResult<MongoClientDeleteResult>> resultHandler) {
delegate.removeDocumentWithOptions(collection, query, writeOption, resultHandler);
return this;
}
Remove a single matching document from a collection with the specified write option and return the handler with MongoClientDeleteResult result
Params: - collection – the collection
- query – query used to match document
- writeOption – the write option to use
Returns: Deprecated: use rxRemoveDocumentWithOptions
instead
/**
* Remove a single matching document from a collection with the specified write option and return the handler with MongoClientDeleteResult result
* @param collection the collection
* @param query query used to match document
* @param writeOption the write option to use
* @return
* @deprecated use {@link #rxRemoveDocumentWithOptions} instead
*/
@Deprecated()
public Observable<MongoClientDeleteResult> removeDocumentWithOptionsObservable(String collection, JsonObject query, WriteOption writeOption) {
io.vertx.rx.java.ObservableFuture<MongoClientDeleteResult> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
removeDocumentWithOptions(collection, query, writeOption, resultHandler.toHandler());
return resultHandler;
}
Remove a single matching document from a collection with the specified write option and return the handler with MongoClientDeleteResult result
Params: - collection – the collection
- query – query used to match document
- writeOption – the write option to use
Returns:
/**
* Remove a single matching document from a collection with the specified write option and return the handler with MongoClientDeleteResult result
* @param collection the collection
* @param query query used to match document
* @param writeOption the write option to use
* @return
*/
public Single<MongoClientDeleteResult> rxRemoveDocumentWithOptions(String collection, JsonObject query, WriteOption writeOption) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
removeDocumentWithOptions(collection, query, writeOption, fut);
}));
}
Create a new collection
Params: - collectionName – the name of the collection
- resultHandler – will be called when complete
Returns:
/**
* Create a new collection
* @param collectionName the name of the collection
* @param resultHandler will be called when complete
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient createCollection(String collectionName, Handler<AsyncResult<Void>> resultHandler) {
delegate.createCollection(collectionName, resultHandler);
return this;
}
Create a new collection
Params: - collectionName – the name of the collection
Returns: Deprecated: use rxCreateCollection
instead
/**
* Create a new collection
* @param collectionName the name of the collection
* @return
* @deprecated use {@link #rxCreateCollection} instead
*/
@Deprecated()
public Observable<Void> createCollectionObservable(String collectionName) {
io.vertx.rx.java.ObservableFuture<Void> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
createCollection(collectionName, resultHandler.toHandler());
return resultHandler;
}
Create a new collection
Params: - collectionName – the name of the collection
Returns:
/**
* Create a new collection
* @param collectionName the name of the collection
* @return
*/
public Single<Void> rxCreateCollection(String collectionName) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
createCollection(collectionName, fut);
}));
}
Get a list of all collections in the database.
Params: - resultHandler – will be called with a list of collections.
Returns:
/**
* Get a list of all collections in the database.
* @param resultHandler will be called with a list of collections.
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient getCollections(Handler<AsyncResult<List<String>>> resultHandler) {
delegate.getCollections(resultHandler);
return this;
}
Get a list of all collections in the database.
Returns: Deprecated: use rxGetCollections
instead
/**
* Get a list of all collections in the database.
* @return
* @deprecated use {@link #rxGetCollections} instead
*/
@Deprecated()
public Observable<List<String>> getCollectionsObservable() {
io.vertx.rx.java.ObservableFuture<List<String>> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
getCollections(resultHandler.toHandler());
return resultHandler;
}
Get a list of all collections in the database.
Returns:
/**
* Get a list of all collections in the database.
* @return
*/
public Single<List<String>> rxGetCollections() {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
getCollections(fut);
}));
}
Drop a collection
Params: - collection – the collection
- resultHandler – will be called when complete
Returns:
/**
* Drop a collection
* @param collection the collection
* @param resultHandler will be called when complete
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient dropCollection(String collection, Handler<AsyncResult<Void>> resultHandler) {
delegate.dropCollection(collection, resultHandler);
return this;
}
Drop a collection
Params: - collection – the collection
Returns: Deprecated: use rxDropCollection
instead
/**
* Drop a collection
* @param collection the collection
* @return
* @deprecated use {@link #rxDropCollection} instead
*/
@Deprecated()
public Observable<Void> dropCollectionObservable(String collection) {
io.vertx.rx.java.ObservableFuture<Void> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
dropCollection(collection, resultHandler.toHandler());
return resultHandler;
}
Drop a collection
Params: - collection – the collection
Returns:
/**
* Drop a collection
* @param collection the collection
* @return
*/
public Single<Void> rxDropCollection(String collection) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
dropCollection(collection, fut);
}));
}
Creates an index.
Params: - collection – the collection
- key – A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.
- resultHandler – will be called when complete
Returns:
/**
* Creates an index.
* @param collection the collection
* @param key A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.
* @param resultHandler will be called when complete
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient createIndex(String collection, JsonObject key, Handler<AsyncResult<Void>> resultHandler) {
delegate.createIndex(collection, key, resultHandler);
return this;
}
Creates an index.
Params: - collection – the collection
- key – A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.
Returns: Deprecated: use rxCreateIndex
instead
/**
* Creates an index.
* @param collection the collection
* @param key A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.
* @return
* @deprecated use {@link #rxCreateIndex} instead
*/
@Deprecated()
public Observable<Void> createIndexObservable(String collection, JsonObject key) {
io.vertx.rx.java.ObservableFuture<Void> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
createIndex(collection, key, resultHandler.toHandler());
return resultHandler;
}
Creates an index.
Params: - collection – the collection
- key – A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.
Returns:
/**
* Creates an index.
* @param collection the collection
* @param key A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.
* @return
*/
public Single<Void> rxCreateIndex(String collection, JsonObject key) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
createIndex(collection, key, fut);
}));
}
Creates an index.
Params: - collection – the collection
- key – A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.
- options – the options for the index
- resultHandler – will be called when complete
Returns:
/**
* Creates an index.
* @param collection the collection
* @param key A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.
* @param options the options for the index
* @param resultHandler will be called when complete
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient createIndexWithOptions(String collection, JsonObject key, IndexOptions options, Handler<AsyncResult<Void>> resultHandler) {
delegate.createIndexWithOptions(collection, key, options, resultHandler);
return this;
}
Creates an index.
Params: - collection – the collection
- key – A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.
- options – the options for the index
Returns: Deprecated: use rxCreateIndexWithOptions
instead
/**
* Creates an index.
* @param collection the collection
* @param key A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.
* @param options the options for the index
* @return
* @deprecated use {@link #rxCreateIndexWithOptions} instead
*/
@Deprecated()
public Observable<Void> createIndexWithOptionsObservable(String collection, JsonObject key, IndexOptions options) {
io.vertx.rx.java.ObservableFuture<Void> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
createIndexWithOptions(collection, key, options, resultHandler.toHandler());
return resultHandler;
}
Creates an index.
Params: - collection – the collection
- key – A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.
- options – the options for the index
Returns:
/**
* Creates an index.
* @param collection the collection
* @param key A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.
* @param options the options for the index
* @return
*/
public Single<Void> rxCreateIndexWithOptions(String collection, JsonObject key, IndexOptions options) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
createIndexWithOptions(collection, key, options, fut);
}));
}
Get all the indexes in this collection.
Params: - collection – the collection
- resultHandler – will be called when complete
Returns:
/**
* Get all the indexes in this collection.
* @param collection the collection
* @param resultHandler will be called when complete
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient listIndexes(String collection, Handler<AsyncResult<JsonArray>> resultHandler) {
delegate.listIndexes(collection, resultHandler);
return this;
}
Get all the indexes in this collection.
Params: - collection – the collection
Returns: Deprecated: use rxListIndexes
instead
/**
* Get all the indexes in this collection.
* @param collection the collection
* @return
* @deprecated use {@link #rxListIndexes} instead
*/
@Deprecated()
public Observable<JsonArray> listIndexesObservable(String collection) {
io.vertx.rx.java.ObservableFuture<JsonArray> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
listIndexes(collection, resultHandler.toHandler());
return resultHandler;
}
Get all the indexes in this collection.
Params: - collection – the collection
Returns:
/**
* Get all the indexes in this collection.
* @param collection the collection
* @return
*/
public Single<JsonArray> rxListIndexes(String collection) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
listIndexes(collection, fut);
}));
}
Drops the index given its name.
Params: - collection – the collection
- indexName – the name of the index to remove
- resultHandler – will be called when complete
Returns:
/**
* Drops the index given its name.
* @param collection the collection
* @param indexName the name of the index to remove
* @param resultHandler will be called when complete
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient dropIndex(String collection, String indexName, Handler<AsyncResult<Void>> resultHandler) {
delegate.dropIndex(collection, indexName, resultHandler);
return this;
}
Drops the index given its name.
Params: - collection – the collection
- indexName – the name of the index to remove
Returns: Deprecated: use rxDropIndex
instead
/**
* Drops the index given its name.
* @param collection the collection
* @param indexName the name of the index to remove
* @return
* @deprecated use {@link #rxDropIndex} instead
*/
@Deprecated()
public Observable<Void> dropIndexObservable(String collection, String indexName) {
io.vertx.rx.java.ObservableFuture<Void> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
dropIndex(collection, indexName, resultHandler.toHandler());
return resultHandler;
}
Drops the index given its name.
Params: - collection – the collection
- indexName – the name of the index to remove
Returns:
/**
* Drops the index given its name.
* @param collection the collection
* @param indexName the name of the index to remove
* @return
*/
public Single<Void> rxDropIndex(String collection, String indexName) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
dropIndex(collection, indexName, fut);
}));
}
Run an arbitrary MongoDB command.
Params: - commandName – the name of the command
- command – the command
- resultHandler – will be called with the result.
Returns:
/**
* Run an arbitrary MongoDB command.
* @param commandName the name of the command
* @param command the command
* @param resultHandler will be called with the result.
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient runCommand(String commandName, JsonObject command, Handler<AsyncResult<JsonObject>> resultHandler) {
delegate.runCommand(commandName, command, resultHandler);
return this;
}
Run an arbitrary MongoDB command.
Params: - commandName – the name of the command
- command – the command
Returns: Deprecated: use rxRunCommand
instead
/**
* Run an arbitrary MongoDB command.
* @param commandName the name of the command
* @param command the command
* @return
* @deprecated use {@link #rxRunCommand} instead
*/
@Deprecated()
public Observable<JsonObject> runCommandObservable(String commandName, JsonObject command) {
io.vertx.rx.java.ObservableFuture<JsonObject> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
runCommand(commandName, command, resultHandler.toHandler());
return resultHandler;
}
Run an arbitrary MongoDB command.
Params: - commandName – the name of the command
- command – the command
Returns:
/**
* Run an arbitrary MongoDB command.
* @param commandName the name of the command
* @param command the command
* @return
*/
public Single<JsonObject> rxRunCommand(String commandName, JsonObject command) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
runCommand(commandName, command, fut);
}));
}
Gets the distinct values of the specified field name.
Return a JsonArray containing distinct values (eg: [ 1 , 89 ])
Params: - collection – the collection
- fieldName – the field name
- resultClassname –
- resultHandler – will be provided with array of values.
Returns:
/**
* Gets the distinct values of the specified field name.
* Return a JsonArray containing distinct values (eg: [ 1 , 89 ])
* @param collection the collection
* @param fieldName the field name
* @param resultClassname
* @param resultHandler will be provided with array of values.
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient distinct(String collection, String fieldName, String resultClassname, Handler<AsyncResult<JsonArray>> resultHandler) {
delegate.distinct(collection, fieldName, resultClassname, resultHandler);
return this;
}
Gets the distinct values of the specified field name.
Return a JsonArray containing distinct values (eg: [ 1 , 89 ])
Params: - collection – the collection
- fieldName – the field name
- resultClassname –
Returns: Deprecated: use rxDistinct
instead
/**
* Gets the distinct values of the specified field name.
* Return a JsonArray containing distinct values (eg: [ 1 , 89 ])
* @param collection the collection
* @param fieldName the field name
* @param resultClassname
* @return
* @deprecated use {@link #rxDistinct} instead
*/
@Deprecated()
public Observable<JsonArray> distinctObservable(String collection, String fieldName, String resultClassname) {
io.vertx.rx.java.ObservableFuture<JsonArray> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
distinct(collection, fieldName, resultClassname, resultHandler.toHandler());
return resultHandler;
}
Gets the distinct values of the specified field name.
Return a JsonArray containing distinct values (eg: [ 1 , 89 ])
Params: - collection – the collection
- fieldName – the field name
- resultClassname –
Returns:
/**
* Gets the distinct values of the specified field name.
* Return a JsonArray containing distinct values (eg: [ 1 , 89 ])
* @param collection the collection
* @param fieldName the field name
* @param resultClassname
* @return
*/
public Single<JsonArray> rxDistinct(String collection, String fieldName, String resultClassname) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
distinct(collection, fieldName, resultClassname, fut);
}));
}
Gets the distinct values of the specified field name filtered by specified query.
Return a JsonArray containing distinct values (eg: [ 1 , 89 ])
Params: - collection – the collection
- fieldName – the field name
- resultClassname –
- query – the query
- resultHandler – will be provided with array of values.
Returns:
/**
* Gets the distinct values of the specified field name filtered by specified query.
* Return a JsonArray containing distinct values (eg: [ 1 , 89 ])
* @param collection the collection
* @param fieldName the field name
* @param resultClassname
* @param query the query
* @param resultHandler will be provided with array of values.
* @return
*/
public io.vertx.rxjava.ext.mongo.MongoClient distinctWithQuery(String collection, String fieldName, String resultClassname, JsonObject query, Handler<AsyncResult<JsonArray>> resultHandler) {
delegate.distinctWithQuery(collection, fieldName, resultClassname, query, resultHandler);
return this;
}
Gets the distinct values of the specified field name filtered by specified query.
Return a JsonArray containing distinct values (eg: [ 1 , 89 ])
Params: - collection – the collection
- fieldName – the field name
- resultClassname –
- query – the query
Returns: Deprecated: use rxDistinctWithQuery
instead
/**
* Gets the distinct values of the specified field name filtered by specified query.
* Return a JsonArray containing distinct values (eg: [ 1 , 89 ])
* @param collection the collection
* @param fieldName the field name
* @param resultClassname
* @param query the query
* @return
* @deprecated use {@link #rxDistinctWithQuery} instead
*/
@Deprecated()
public Observable<JsonArray> distinctWithQueryObservable(String collection, String fieldName, String resultClassname, JsonObject query) {
io.vertx.rx.java.ObservableFuture<JsonArray> resultHandler = io.vertx.rx.java.RxHelper.observableFuture();
distinctWithQuery(collection, fieldName, resultClassname, query, resultHandler.toHandler());
return resultHandler;
}
Gets the distinct values of the specified field name filtered by specified query.
Return a JsonArray containing distinct values (eg: [ 1 , 89 ])
Params: - collection – the collection
- fieldName – the field name
- resultClassname –
- query – the query
Returns:
/**
* Gets the distinct values of the specified field name filtered by specified query.
* Return a JsonArray containing distinct values (eg: [ 1 , 89 ])
* @param collection the collection
* @param fieldName the field name
* @param resultClassname
* @param query the query
* @return
*/
public Single<JsonArray> rxDistinctWithQuery(String collection, String fieldName, String resultClassname, JsonObject query) {
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
distinctWithQuery(collection, fieldName, resultClassname, query, fut);
}));
}
Gets the distinct values of the specified field name.
This method use batchCursor for returning each found value.
Each value is a json fragment with fieldName key (eg: {"num": 1}).
Params: - collection – the collection
- fieldName – the field name
- resultClassname –
Returns: a emitting json fragments
/**
* Gets the distinct values of the specified field name.
* This method use batchCursor for returning each found value.
* Each value is a json fragment with fieldName key (eg: {"num": 1}).
* @param collection the collection
* @param fieldName the field name
* @param resultClassname
* @return a emitting json fragments
*/
public io.vertx.rxjava.core.streams.ReadStream<JsonObject> distinctBatch(String collection, String fieldName, String resultClassname) {
io.vertx.rxjava.core.streams.ReadStream<JsonObject> ret = io.vertx.rxjava.core.streams.ReadStream.newInstance(delegate.distinctBatch(collection, fieldName, resultClassname), io.vertx.lang.rx.TypeArg.unknown());
return ret;
}
Gets the distinct values of the specified field name filtered by specified query.
This method use batchCursor for returning each found value.
Each value is a json fragment with fieldName key (eg: {"num": 1}).
Params: - collection – the collection
- fieldName – the field name
- resultClassname –
- query – the query
Returns: a emitting json fragments
/**
* Gets the distinct values of the specified field name filtered by specified query.
* This method use batchCursor for returning each found value.
* Each value is a json fragment with fieldName key (eg: {"num": 1}).
* @param collection the collection
* @param fieldName the field name
* @param resultClassname
* @param query the query
* @return a emitting json fragments
*/
public io.vertx.rxjava.core.streams.ReadStream<JsonObject> distinctBatchWithQuery(String collection, String fieldName, String resultClassname, JsonObject query) {
io.vertx.rxjava.core.streams.ReadStream<JsonObject> ret = io.vertx.rxjava.core.streams.ReadStream.newInstance(delegate.distinctBatchWithQuery(collection, fieldName, resultClassname, query), io.vertx.lang.rx.TypeArg.unknown());
return ret;
}
Gets the distinct values of the specified field name filtered by specified query.
This method use batchCursor for returning each found value.
Each value is a json fragment with fieldName key (eg: {"num": 1}).
Params: - collection – the collection
- fieldName – the field name
- resultClassname –
- query – the query
- batchSize – the number of documents to load in a batch
Returns: a emitting json fragments
/**
* Gets the distinct values of the specified field name filtered by specified query.
* This method use batchCursor for returning each found value.
* Each value is a json fragment with fieldName key (eg: {"num": 1}).
* @param collection the collection
* @param fieldName the field name
* @param resultClassname
* @param query the query
* @param batchSize the number of documents to load in a batch
* @return a emitting json fragments
*/
public io.vertx.rxjava.core.streams.ReadStream<JsonObject> distinctBatchWithQuery(String collection, String fieldName, String resultClassname, JsonObject query, int batchSize) {
io.vertx.rxjava.core.streams.ReadStream<JsonObject> ret = io.vertx.rxjava.core.streams.ReadStream.newInstance(delegate.distinctBatchWithQuery(collection, fieldName, resultClassname, query, batchSize), io.vertx.lang.rx.TypeArg.unknown());
return ret;
}
Run aggregate MongoDB command with default AggregateOptions
. Params: - collection – the collection
- pipeline – aggregation pipeline to be executed
Returns:
/**
* Run aggregate MongoDB command with default {@link io.vertx.ext.mongo.AggregateOptions}.
* @param collection the collection
* @param pipeline aggregation pipeline to be executed
* @return
*/
public io.vertx.rxjava.core.streams.ReadStream<JsonObject> aggregate(String collection, JsonArray pipeline) {
io.vertx.rxjava.core.streams.ReadStream<JsonObject> ret = io.vertx.rxjava.core.streams.ReadStream.newInstance(delegate.aggregate(collection, pipeline), io.vertx.lang.rx.TypeArg.unknown());
return ret;
}
Run aggregate MongoDB command.
Params: - collection – the collection
- pipeline – aggregation pipeline to be executed
- options – options to configure the aggregation command
Returns:
/**
* Run aggregate MongoDB command.
* @param collection the collection
* @param pipeline aggregation pipeline to be executed
* @param options options to configure the aggregation command
* @return
*/
public io.vertx.rxjava.core.streams.ReadStream<JsonObject> aggregateWithOptions(String collection, JsonArray pipeline, AggregateOptions options) {
io.vertx.rxjava.core.streams.ReadStream<JsonObject> ret = io.vertx.rxjava.core.streams.ReadStream.newInstance(delegate.aggregateWithOptions(collection, pipeline, options), io.vertx.lang.rx.TypeArg.unknown());
return ret;
}
Close the client and release its resources
/**
* Close the client and release its resources
*/
public void close() {
delegate.close();
}
The name of the default pool
/**
* The name of the default pool
*/
public static final String DEFAULT_POOL_NAME = io.vertx.ext.mongo.MongoClient.DEFAULT_POOL_NAME;
The name of the default database
/**
* The name of the default database
*/
public static final String DEFAULT_DB_NAME = io.vertx.ext.mongo.MongoClient.DEFAULT_DB_NAME;
public static MongoClient newInstance(io.vertx.ext.mongo.MongoClient arg) {
return arg != null ? new MongoClient(arg) : null;
}
}