Class TypeWithPredicateMatcher<T extends RelationalExpressionWithPredicate>
- java.lang.Object
-
- com.apple.foundationdb.record.query.plan.temp.matchers.TypeMatcher<T>
-
- com.apple.foundationdb.record.query.plan.temp.matchers.TypeWithPredicateMatcher<T>
-
- Type Parameters:
T
- the type ofRelationalExpressionWithPredicate
to match against
- All Implemented Interfaces:
ExpressionMatcher<T>
public class TypeWithPredicateMatcher<T extends RelationalExpressionWithPredicate> extends TypeMatcher<T>
Matches a subclass ofRelationalExpressionWithPredicate
with a given predicate (as determined byRelationalExpressionWithPredicate.getPredicate()
and a given matcher against the children.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.apple.foundationdb.record.query.plan.temp.matchers.ExpressionMatcher
ExpressionMatcher.DefaultMatcher<T extends Bindable>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stream<PlannerBindings>
matchWith(PlannerBindings outerBindings, RelationalExpression expression, List<? extends Bindable> children)
Attempt to match this matcher against the givenExpressionMatcher
.static <U extends RelationalExpressionWithPredicate>
TypeWithPredicateMatcher<U>ofPredicate(Class<? extends U> expressionClass, ExpressionMatcher<? extends QueryPredicate> predicateMatcher)
static <U extends RelationalExpressionWithPredicate>
TypeWithPredicateMatcher<U>ofPredicate(Class<? extends U> expressionClass, ExpressionMatcher<? extends QueryPredicate> predicateMatcher, ExpressionChildrenMatcher childrenMatcher)
static <U extends RelationalExpressionWithPredicate>
TypeWithPredicateMatcher<U>ofPredicate(Class<? extends U> expressionClass, ExpressionMatcher<? extends QueryPredicate> predicateMatcher, ExpressionMatcher<? extends Bindable>... children)
-
Methods inherited from class com.apple.foundationdb.record.query.plan.temp.matchers.TypeMatcher
getChildrenMatcher, getRootClass, matchWith, matchWith, matchWith, matchWith, matchWith, of, of, of
-
-
-
-
Method Detail
-
matchWith
@Nonnull public Stream<PlannerBindings> matchWith(@Nonnull PlannerBindings outerBindings, @Nonnull RelationalExpression expression, @Nonnull List<? extends Bindable> children)
Description copied from interface:ExpressionMatcher
Attempt to match this matcher against the givenExpressionMatcher
. Note that implementations ofmatchWith()
should only attempt to match the given root with this planner expression.- Specified by:
matchWith
in interfaceExpressionMatcher<T extends RelationalExpressionWithPredicate>
- Overrides:
matchWith
in classTypeMatcher<T extends RelationalExpressionWithPredicate>
- Parameters:
outerBindings
- preexisting bindings to be used by the matcherexpression
- a planner expression to match withchildren
- the conceptual children ofexpression
- Returns:
- a stream of
PlannerBindings
containing the matched bindings, or an empty stream is no match was found
-
ofPredicate
public static <U extends RelationalExpressionWithPredicate> TypeWithPredicateMatcher<U> ofPredicate(@Nonnull Class<? extends U> expressionClass, @Nonnull ExpressionMatcher<? extends QueryPredicate> predicateMatcher)
-
ofPredicate
@SafeVarargs public static <U extends RelationalExpressionWithPredicate> TypeWithPredicateMatcher<U> ofPredicate(@Nonnull Class<? extends U> expressionClass, @Nonnull ExpressionMatcher<? extends QueryPredicate> predicateMatcher, @Nonnull ExpressionMatcher<? extends Bindable>... children)
-
ofPredicate
public static <U extends RelationalExpressionWithPredicate> TypeWithPredicateMatcher<U> ofPredicate(@Nonnull Class<? extends U> expressionClass, @Nonnull ExpressionMatcher<? extends QueryPredicate> predicateMatcher, @Nonnull ExpressionChildrenMatcher childrenMatcher)
-
-