$graphLookup class
$graphLookup
Stage description
Performs a recursive search on a collection, with options for restricting the search by recursion depth and query filter. see mongo db documentation
Dart code:
$graphLookup(
from: 'employees',
startWith: 'reportsTo',
connectFromField: 'reportsTo',
connectToField: 'name',
as: 'reportingHierarchy',
depthField: 'depth',
maxDepth: 5,
restrictSearchWithMatch: where..$eq('field', 'value'))
.build();
Equivalent mongoDB aggregation stage:
$graphLookup: {
from: "employees",
startWith: "$reportsTo",
connectFromField: "reportsTo",
connectToField: "name",
as : "reportingHierarchy",
depthField: "depth",
maxDepth: 5,
restrictSearchWithMatch : {
field : {$eq: "value"}
}
}
- Inheritance
Constructors
Properties
- content → ExpressionContent
-
no setterinherited
-
entry
↔ MapEntry<
String, ExpressionContent> -
getter/setter pairinherited
- fieldName → String
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → String
-
no setterinherited
- rawContent → dynamic
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stageName → String
-
no setterinherited
Methods
-
build(
) → MongoDocument -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited