Package com.apple.foundationdb.record.query.plan.plans
Classes implementing executable query plan elements.
The result of planning a query is a RecordQueryPlan
, which supports an execute
method
against an FDBRecordStore
with an EvaluationContext
holding dynamic parameter values.
The most basic plan elements read from the database. For example,
RecordQueryScanPlan
scans the record store for all records.RecordQueryIndexPlan
scans a secondary index.
In most cases, a plan is actually a tree of RecordQueryPlan
elements,
which is executed by asynchronously streaming the results of child plan elements into the parent processor.
For example,
- A
RecordQueryFilterPlan
evaluates a boolean predicate expression against upstream records, only letting through those that satisfy it. - A
RecordQueryUnionPlan
merges two or more compatibly-ordered streams of records into one, eliminating duplicates. - A
RecordQueryIntersectionPlan
merges two or more compatibly-ordered streams of records into one, keeping only those that appear in all streams.
-
Interface Summary Interface Description QueryPlan<T> An executable query plan.RecordQueryLoadByKeysPlan.KeysSource A source for the primary keys for records.RecordQueryPlan An executable query plan for producing records.RecordQueryPlanWithChild A query plan with a single child plan.RecordQueryPlanWithChildren A query plan with child plans.RecordQueryPlanWithComparisons A query plan that usesScanComparisons
to drive some scan of the record store.RecordQueryPlanWithIndex A query plan that uses a single index.RecordQueryPlanWithNoChildren A query plan that does not have any child plans.RecordQueryPlanWithRequiredFields Interface for query plans that have fields that must be present for successful execution. -
Class Summary Class Description RecordQueryCoveringIndexPlan A query plan that reconstructs records from the entries in a covering index.RecordQueryFetchFromPartialRecordPlan A query plan that transforms a stream of partial records (derived from index entries, as in theRecordQueryCoveringIndexPlan
) into full records by fetching the records by primary key.RecordQueryFilterPlan A query plan that filters out records from a child plan that do not satisfy a filter component.RecordQueryIndexPlan A query plan that outputs records pointed to by entries in a secondary index within some range.RecordQueryInJoinPlan A query plan that executes a child plan once for each of the elements of someIN
list.RecordQueryInParameterJoinPlan A query plan that executes a child plan once for each of the elements of anIN
list taken from a parameter.RecordQueryIntersectionPlan A query plan that executes by taking the union of records from two or more compatibly-sorted child plans.RecordQueryInValuesJoinPlan A query plan that executes a child plan once for each of the elements of a constantIN
list.RecordQueryLoadByKeysPlan A query plan that returns records whose primary keys are taken from some list.RecordQueryPredicateFilterPlan A query plan that filters out records from a child plan that do not satisfy aQueryPredicate
.RecordQueryScanPlan A query plan that scans records directly from the main tree within a range of primary keys.RecordQueryScoreForRankPlan A query plan that converts ranks to scores and executes a child plan with the conversion results bound in named parameters.RecordQueryScoreForRankPlan.ScoreForRank A single conversion of a rank to a score to be bound to some name.RecordQueryTextIndexPlan A query plan that can scan text indexes.RecordQueryTypeFilterPlan A query plan that filters out records from a child plan that are not of the designated record type(s).RecordQueryUnionPlan A query plan that executes by taking the union of records from two or more compatibly-sorted child plans.RecordQueryUnionPlanBase Common base class for plans that perform stream union operations.RecordQueryUnorderedDistinctPlan A query plan that removes duplicates by means of a hash table of previously seen values.RecordQueryUnorderedPrimaryKeyDistinctPlan A query plan that removes duplicates by means of a hash table of primary keys already seen.RecordQueryUnorderedUnionPlan A query plan that returns results from two-or-more cursors as they as ready.