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: "follows",
startWith: "user_id",
connectFromField: "my_follows",
connectToField: "followed",
as: "same_follows",
depthField: "depth",
maxDepth: 3,
restrictSearchWithMatch: where.ne("user_id", "user1"));
Equivalent mongoDB aggregation stage:
$graphLookup: {
from: "follows",
startWith: "$user_id",
connectFromField: "my_follows",
connectToField: "followed",
as: "same_follows",
depthField: "depth",
maxDepth : 3,
restrictSearchWithMatch: {
follower: {$ne: "user1"}
}
}
- Inheritance
-
- Object
- AggregationStage
- GraphLookup
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
) → Map< String, Object> -
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