Module spring.data.mongodb
Class VariableOperators.Let
java.lang.Object
org.springframework.data.mongodb.core.aggregation.VariableOperators.Let
- All Implemented Interfaces:
AggregationExpression,MongoExpression
- Enclosing class:
- VariableOperators
AggregationExpression for $let that binds AggregationExpression to variables for use in the
specified in expression, and returns the result of the expression.- Since:
- 1.10
- Author:
- Christoph Strobl
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interface -
Method Summary
Modifier and TypeMethodDescriptiondefine(Collection<VariableOperators.Let.ExpressionVariable> variables) Start creating newVariableOperators.Letby defining the variables for$vars.define(VariableOperators.Let.ExpressionVariable... variables) Start creating newVariableOperators.Letby defining the variables for$vars.static VariableOperators.Letjust(VariableOperators.Let.ExpressionVariable... variables) Create a newVariableOperators.Letholding just the given variables.org.bson.DocumenttoDocument(AggregationOperationContext context) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.data.mongodb.core.aggregation.AggregationExpression
toDocument
-
Method Details
-
just
Create a newVariableOperators.Letholding just the given variables.- Parameters:
variables- must not be null.- Returns:
- new instance of
VariableOperators.Let. - Since:
- 4.1
-
define
public static VariableOperators.Let.LetBuilder define(Collection<VariableOperators.Let.ExpressionVariable> variables) Start creating newVariableOperators.Letby defining the variables for$vars.- Parameters:
variables- must not be null.- Returns:
-
define
public static VariableOperators.Let.LetBuilder define(VariableOperators.Let.ExpressionVariable... variables) Start creating newVariableOperators.Letby defining the variables for$vars.- Parameters:
variables- must not be null.- Returns:
-
toDocument
Description copied from interface:AggregationExpression- Specified by:
toDocumentin interfaceAggregationExpression- Parameters:
context- must not be null.- Returns:
- the MongoDB native (
Document) form of the expression.
-