@API(value=EXPERIMENTAL) public class NestedContext extends Object
NestedContext
is defined by a single FieldKeyExpression
and represents a relative nesting within
the internal state of the query planner. Various objects that the query planner uses, such as
PlannerExpression
s and KeyExpressionComparisons
, can be nestedand unnested relative
to a NestedContext
, allowing most query planner rules to ignore the complexities of dealing with queries on
nested record structures. The NestedContext
itself tracks the properties of the nested field and provides
a variety of convenience methods for simplifying the implementation of the asNestedWith()
and
asUnnestedWith()
on various planner-related classes.Constructor and Description |
---|
NestedContext(FieldKeyExpression parentField) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
ExpressionRef<QueryComponent> |
getNestedQueryComponent(ExpressionRef<QueryComponent> ref) |
ExpressionRef<RelationalPlannerExpression> |
getNestedRelationalPlannerExpression(ExpressionRef<RelationalPlannerExpression> ref) |
FieldKeyExpression |
getParentField() |
ExpressionRef<QueryComponent> |
getUnnestedQueryComponent(ExpressionRef<QueryComponent> ref) |
ExpressionRef<RelationalPlannerExpression> |
getUnnestedRelationalPlannerExpression(ExpressionRef<RelationalPlannerExpression> ref) |
int |
hashCode() |
boolean |
isParentFieldFannedOut() |
public NestedContext(@Nonnull FieldKeyExpression parentField)
@Nonnull public FieldKeyExpression getParentField()
public boolean isParentFieldFannedOut()
@Nullable public ExpressionRef<RelationalPlannerExpression> getNestedRelationalPlannerExpression(@Nonnull ExpressionRef<RelationalPlannerExpression> ref)
@Nullable public ExpressionRef<QueryComponent> getNestedQueryComponent(@Nonnull ExpressionRef<QueryComponent> ref)
@Nullable public ExpressionRef<RelationalPlannerExpression> getUnnestedRelationalPlannerExpression(@Nonnull ExpressionRef<RelationalPlannerExpression> ref)
@Nullable public ExpressionRef<QueryComponent> getUnnestedQueryComponent(@Nonnull ExpressionRef<QueryComponent> ref)