com.mongodb.client.model.Aggregates.graphLookup()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(213)

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

Aggregates.graphLookup介绍

[英]Creates a graphLookup pipeline stage for the specified filter
[中]为指定的筛选器创建graphLookup管道阶段

代码示例

代码示例来源:origin: org.mongodb/mongo-java-driver

/**
 * Creates a graphLookup pipeline stage for the specified filter
 *
 * @param <TExpression>     the expression type
 * @param from             the collection to query
 * @param startWith        the expression to start the graph lookup with
 * @param connectFromField the from field
 * @param connectToField   the to field
 * @param as               name of field in output document
 * @return the $graphLookup pipeline stage
 * @mongodb.driver.manual reference/operator/aggregation/graphLookup/ $graphLookup
 * @mongodb.server.release 3.4
 * @since 3.4
 */
public static <TExpression> Bson graphLookup(final String from, final TExpression startWith, final String connectFromField,
                       final String connectToField, final String as) {
  return graphLookup(from, startWith, connectFromField, connectToField, as, new GraphLookupOptions());
}

代码示例来源:origin: T-baby/MongoDB-Plugin

public <TExpression> MongoAggregation grahpLookup(String from, TExpression startWith, String connectFromField,
                         String connectToField, String as, GraphLookupOptions options) {
  pipeline.add(Aggregates.graphLookup(from, startWith, connectFromField, connectToField, as, options));
  return this;
}

代码示例来源:origin: com.cybermkd/MongodbPlugin

public <TExpression> MongoAggregation grahpLookup(String from, TExpression startWith, String connectFromField,
                         String connectToField, String as, GraphLookupOptions options) {
  pipeline.add(Aggregates.graphLookup(from, startWith, connectFromField, connectToField, as, options));
  return this;
}

代码示例来源:origin: org.mongodb/mongodb-driver-core

/**
 * Creates a graphLookup pipeline stage for the specified filter
 *
 * @param <TExpression>     the expression type
 * @param from             the collection to query
 * @param startWith        the expression to start the graph lookup with
 * @param connectFromField the from field
 * @param connectToField   the to field
 * @param as               name of field in output document
 * @return the $graphLookup pipeline stage
 * @mongodb.driver.manual reference/operator/aggregation/graphLookup/ $graphLookup
 * @mongodb.server.release 3.4
 * @since 3.4
 */
public static <TExpression> Bson graphLookup(final String from, final TExpression startWith, final String connectFromField,
                       final String connectToField, final String as) {
  return graphLookup(from, startWith, connectFromField, connectToField, as, new GraphLookupOptions());
}

相关文章