io.vertx.ext.mongo.MongoClient.findWithOptions()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(4.0k)|赞(0)|评价(0)|浏览(102)

本文整理了Java中io.vertx.ext.mongo.MongoClient.findWithOptions()方法的一些代码示例,展示了MongoClient.findWithOptions()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MongoClient.findWithOptions()方法的具体详情如下:
包路径:io.vertx.ext.mongo.MongoClient
类名称:MongoClient
方法名:findWithOptions

MongoClient.findWithOptions介绍

暂无

代码示例

代码示例来源:origin: io.vertx/vertx-rx-java

/**
 * 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;
}

代码示例来源:origin: io.vertx/vertx-mongo-service

@Override
public MongoService findWithOptions(String collection, JsonObject query, FindOptions options,
  Handler<AsyncResult<List<JsonObject>>> resultHandler) {
 client.findWithOptions(collection, query, options, resultHandler);
 return this;
}

代码示例来源:origin: vert-x3/vertx-rx

/**
 * 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;
}

代码示例来源:origin: silentbalanceyh/vertx-zero

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);
  }));
}

代码示例来源:origin: cn.vertxup/vertx-up

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);
  }));
}

代码示例来源:origin: io.vertx/vertx-lang-groovy

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) {

相关文章

微信公众号

最新文章

更多