Class Quantifiers
- java.lang.Object
-
- com.apple.foundationdb.record.query.plan.temp.Quantifiers
-
public class Quantifiers extends Object
Auxiliary class containing factory methods and helpers forQuantifier
.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <E extends RelationalExpression>
List<Quantifier.Existential>existentialQuantifiers(Iterable<? extends ExpressionRef<E>> rangesOverPlans)
Create a list of existential quantifiers from a list of expression references these quantifiers should range over.static <E extends RelationalExpression>
List<Quantifier.ForEach>forEachQuantifiers(Iterable<ExpressionRef<E>> rangesOverExpressions)
Create a list of for-each quantifiers from a list of references to range over.static <E extends RelationalExpression,Q extends Quantifier>
List<Q>fromExpressions(Iterable<? extends ExpressionRef<E>> rangesOverExpressions, Function<ExpressionRef<E>,Q> creator)
Create a list of quantifiers given a list of references these quantifiers should range over.static <E extends RecordQueryPlan>
List<Quantifier.Physical>fromPlans(Iterable<? extends ExpressionRef<E>> rangesOverPlans)
Create a list of physical quantifiers given a list of references these quantifiers should range over.
-
-
-
Method Detail
-
forEachQuantifiers
@Nonnull public static <E extends RelationalExpression> List<Quantifier.ForEach> forEachQuantifiers(@Nonnull Iterable<ExpressionRef<E>> rangesOverExpressions)
Create a list of for-each quantifiers from a list of references to range over.- Type Parameters:
E
- type parameter to constrain expressions toRelationalExpression
- Parameters:
rangesOverExpressions
- iterableExpressionRef
s ofRelationalExpression
s- Returns:
- a list of for-each quantifiers where each quantifier ranges over one of the given references
-
existentialQuantifiers
@Nonnull public static <E extends RelationalExpression> List<Quantifier.Existential> existentialQuantifiers(@Nonnull Iterable<? extends ExpressionRef<E>> rangesOverPlans)
Create a list of existential quantifiers from a list of expression references these quantifiers should range over.- Type Parameters:
E
- type parameter to constrain expressions toRelationalExpression
- Parameters:
rangesOverPlans
- iterableExpressionRef
s of ofRelationalExpression
s.- Returns:
- a list of physical quantifiers where each quantifier ranges over one of the given references
-
fromPlans
@Nonnull public static <E extends RecordQueryPlan> List<Quantifier.Physical> fromPlans(@Nonnull Iterable<? extends ExpressionRef<E>> rangesOverPlans)
Create a list of physical quantifiers given a list of references these quantifiers should range over.- Type Parameters:
E
- type parameter to constrain expressions toRecordQueryPlan
- Parameters:
rangesOverPlans
- iterableExpressionRef
s ofRecordQueryPlan
- Returns:
- a list of physical quantifiers where each quantifier ranges over a reference contained in the given iterable
-
fromExpressions
@Nonnull public static <E extends RelationalExpression,Q extends Quantifier> List<Q> fromExpressions(@Nonnull Iterable<? extends ExpressionRef<E>> rangesOverExpressions, @Nonnull Function<ExpressionRef<E>,Q> creator)
Create a list of quantifiers given a list of references these quantifiers should range over.- Type Parameters:
E
- type parameter to constrain expressions toRelationalExpression
Q
- the type of the quantifier to be created- Parameters:
rangesOverExpressions
- iterable ofExpressionRef
s the quantifiers will be created to range overcreator
- lambda to to be called for each expression reference contained inrangesOverExpression
s to create the actual quantifier. This allows for callers to create different kinds of quantifier based on needs.- Returns:
- a list of quantifiers where each quantifier ranges over an reference contained in the given iterable
-
-