/** * 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; }
@Override public MongoService findWithOptions(String collection, JsonObject query, FindOptions options, Handler<AsyncResult<List<JsonObject>>> resultHandler) { client.findWithOptions(collection, query, options, resultHandler); return this; }
/** * 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; }
static Future<JsonArray> findWithOptions(final String collection, final JsonObject filter, final FindOptions options) { return Ux.thenGeneric(future -> CLIENT.findWithOptions(collection, filter, options, res -> { final JsonArray result = new JsonArray(); Observable.fromIterable(res.result()) .filter(Objects::nonNull) .subscribe(result::add); LOGGER.debug(Info.MONGO_FIND, collection, filter, options.toJson(), result); future.complete(result); })); }
static Future<JsonArray> findWithOptions(final String collection, final JsonObject filter, final FindOptions options) { return Ux.thenGeneric(future -> CLIENT.findWithOptions(collection, filter, options, res -> { final JsonArray result = new JsonArray(); Observable.fromIterable(res.result()) .filter(Objects::nonNull) .subscribe(result::add); LOGGER.debug(Info.MONGO_FIND, collection, filter, options.toJson(), result); future.complete(result); })); }
public static io.vertx.ext.mongo.MongoClient findWithOptions(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, java.util.Map<String, Object> options, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<java.util.Map<String, Object>>>> resultHandler) { io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.findWithOptions(collection, query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null, options != null ? new io.vertx.ext.mongo.FindOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(options)) : null, resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<io.vertx.core.json.JsonObject>>>() { public void handle(io.vertx.core.AsyncResult<java.util.List<io.vertx.core.json.JsonObject>> ar) { resultHandler.handle(ar.map(event -> event != null ? event.stream().map(elt -> io.vertx.core.impl.ConversionHelper.fromJsonObject(elt)).collect(java.util.stream.Collectors.toList()) : null)); } } : null)); return j_receiver; } public static io.vertx.core.streams.ReadStream<io.vertx.core.json.JsonObject> findBatchWithOptions(io.vertx.ext.mongo.MongoClient j_receiver, java.lang.String collection, java.util.Map<String, Object> query, java.util.Map<String, Object> options) {