Package | Description |
---|---|
org.modeshape.jcr.query |
The Query API provides a mechanism for building and executing queries.
|
org.modeshape.jcr.query.lucene |
The core query engine, which currently uses Lucene for indexing and raw queries, and
the Hibernate Search engine (which does not depend on or use Hibernate Core or JPA)
for updating and querying the Lucene indexes.
|
org.modeshape.jcr.query.lucene.basic |
The "basic"
Lucene schema has a single index in which all node
and property information are indexed into separate fields. |
org.modeshape.jcr.query.optimize |
This package contains the Optimizer interface, a rule-based optimizer implementation, and library of optimization rules.
|
org.modeshape.jcr.query.plan |
This package defines the
Planner interface, the CanonicalPlanner implementation, and the
PlanNode class that is used to represent a canonical query plan. |
org.modeshape.jcr.query.process |
This package defines the
QueryProcessor interface, which is responsible for constructing for each query
a tree of ProcessingComponent objects that each are responsible for processing a specific aspect of
the query and returning the tuples to the parent component. |
org.modeshape.jcr.query.validate |
This package provides the interfaces that define the tables and columns that can be queried.
|
Modifier and Type | Method and Description |
---|---|
QueryContext |
QueryContext.with(Map<String,Object> variables)
Obtain a copy of this context, except that the copy uses the supplied variables.
|
QueryContext |
QueryContext.with(PlanHints hints)
Obtain a copy of this context, except that the copy uses the supplied hints.
|
QueryContext |
QueryContext.with(Problems problems)
Obtain a copy of this context, except that the copy uses the supplied problem container.
|
QueryContext |
QueryContext.with(Schemata schemata)
Obtain a copy of this context, except that the copy uses the supplied schemata.
|
Constructor and Description |
---|
QueryContext(QueryContext original)
Create a new context that is a copy of the supplied context.
|
Modifier and Type | Field and Description |
---|---|
protected QueryContext |
LuceneQueryFactory.context |
Modifier and Type | Method and Description |
---|---|
QueryContext |
LuceneProcessingContext.getQueryContext() |
Modifier and Type | Method and Description |
---|---|
protected ProcessingComponent |
LuceneQueryEngine.LuceneQueryProcessor.createAccessComponent(QueryCommand originalQuery,
QueryContext context,
PlanNode accessNode,
QueryResults.Columns resultColumns,
LuceneProcessingContext processingContext) |
LuceneQueryFactory |
LuceneSchema.createLuceneQueryFactory(QueryContext context,
org.hibernate.search.SearchFactory searchFactory) |
protected LuceneProcessingContext |
LuceneQueryEngine.LuceneQueryProcessor.createProcessingContext(QueryContext queryContext) |
LuceneQueryEngine.TupleCollector |
LuceneSchema.createTupleCollector(QueryContext queryContext,
QueryResults.Columns columns) |
Constructor and Description |
---|
LuceneProcessingContext(QueryContext queryContext,
String repositoryName,
org.hibernate.search.SearchFactory searchFactory,
LuceneSchema schema) |
LuceneQueryEngine.LuceneAccessQuery(LuceneSchema schema,
LuceneProcessingContext processingContext,
QueryContext context,
QueryResults.Columns resultColumns,
PlanNode accessNode) |
LuceneQueryFactory(QueryContext context,
org.hibernate.search.SearchFactory searchFactory,
org.apache.lucene.util.Version version) |
Modifier and Type | Method and Description |
---|---|
LuceneQueryFactory |
BasicLuceneSchema.createLuceneQueryFactory(QueryContext context,
org.hibernate.search.SearchFactory searchFactory) |
LuceneQueryEngine.TupleCollector |
BasicLuceneSchema.createTupleCollector(QueryContext queryContext,
QueryResults.Columns columns) |
Constructor and Description |
---|
BasicLuceneQueryFactory(QueryContext context,
org.hibernate.search.SearchFactory searchFactory,
org.apache.lucene.util.Version version) |
BasicTupleCollector(QueryContext queryContext,
QueryResults.Columns columns) |
Modifier and Type | Method and Description |
---|---|
protected void |
AddJoinConditionColumnsToSources.addEquiJoinColumn(QueryContext context,
PlanNode node,
Column joinColumn)
Make sure that the supplied column is included in the
projected columns on the supplied
plan node or its children. |
protected boolean |
AddOrderingColumnsToSources.addIfMissing(QueryContext context,
Column column,
List<Column> columns,
List<String> columnTypes)
Check the supplied list of columns for an existing column that matches the supplied
Column , and if none is found
add the supplied Column to the list and add an appropriate type. |
protected boolean |
AddJoinConditionColumnsToSources.addIfMissing(QueryContext context,
Column column,
List<Column> columns,
List<String> columnTypes)
Check the supplied list of columns for an existing column that matches the supplied
Column , and if none is found
add the supplied Column to the list and add an appropriate type. |
protected boolean |
AddOrderingColumnsToSources.addSortColumn(QueryContext context,
PlanNode node,
Column sortColumn)
Make sure that the supplied column is included in the
projected columns on the supplied
plan node or its children. |
protected int |
RewriteAsRangeCriteria.compareStaticOperands(QueryContext context,
Comparison comparison1,
Comparison comparison2)
Compare the values used in the two comparisons
|
protected PlanNode |
RaiseSelectCriteria.copySelectNode(QueryContext context,
PlanNode selectNode,
SelectorName selectorName,
String propertyName,
SelectorName copySelectorName,
String copyPropertyName) |
protected PlanNode |
CopyCriteria.copySelectNode(QueryContext context,
PlanNode selectNode,
SelectorName selectorName,
String propertyName,
SelectorName copySelectorName,
String copyPropertyName) |
protected void |
CopyCriteria.copySelectNodes(QueryContext context,
PlanNode fromJoined,
PlanNode toJoined) |
PlanNode |
RightOuterToLeftOuterJoins.execute(QueryContext context,
PlanNode plan,
LinkedList<OptimizerRule> ruleStack) |
PlanNode |
RewritePseudoColumns.execute(QueryContext context,
PlanNode plan,
LinkedList<OptimizerRule> ruleStack) |
PlanNode |
RewritePathAndNameCriteria.execute(QueryContext context,
PlanNode plan,
LinkedList<OptimizerRule> ruleStack) |
PlanNode |
RewriteIdentityJoins.execute(QueryContext context,
PlanNode plan,
LinkedList<OptimizerRule> ruleStack) |
PlanNode |
RewriteAsRangeCriteria.execute(QueryContext context,
PlanNode plan,
LinkedList<OptimizerRule> ruleStack) |
PlanNode |
ReplaceViews.execute(QueryContext context,
PlanNode plan,
LinkedList<OptimizerRule> ruleStack) |
PlanNode |
RemoveEmptyAccessNodes.execute(QueryContext context,
PlanNode plan,
LinkedList<OptimizerRule> ruleStack) |
PlanNode |
RaiseVariableName.execute(QueryContext context,
PlanNode plan,
LinkedList<OptimizerRule> ruleStack) |
PlanNode |
RaiseSelectCriteria.execute(QueryContext context,
PlanNode plan,
LinkedList<OptimizerRule> ruleStack) |
PlanNode |
PushSelectCriteria.execute(QueryContext context,
PlanNode plan,
LinkedList<OptimizerRule> ruleStack) |
PlanNode |
PushProjects.execute(QueryContext context,
PlanNode plan,
LinkedList<OptimizerRule> ruleStack) |
PlanNode |
OptimizerRule.execute(QueryContext context,
PlanNode plan,
LinkedList<OptimizerRule> ruleStack)
Optimize the supplied plan using the supplied context, hints, and yet-to-be-run rules.
|
PlanNode |
CopyCriteria.execute(QueryContext context,
PlanNode plan,
LinkedList<OptimizerRule> ruleStack) |
PlanNode |
ChooseJoinAlgorithm.execute(QueryContext context,
PlanNode plan,
LinkedList<OptimizerRule> ruleStack) |
PlanNode |
AddOrderingColumnsToSources.execute(QueryContext context,
PlanNode plan,
LinkedList<OptimizerRule> ruleStack) |
PlanNode |
AddJoinConditionColumnsToSources.execute(QueryContext context,
PlanNode plan,
LinkedList<OptimizerRule> ruleStack) |
PlanNode |
AddAccessNodes.execute(QueryContext context,
PlanNode plan,
LinkedList<OptimizerRule> ruleStack) |
protected Comparison |
RewriteAsRangeCriteria.getComparison(QueryContext context,
Comparison comparison1,
Comparison comparison2,
boolean smallest)
Get the comparison with the smallest (or largest) value.
|
protected Object |
RewriteAsRangeCriteria.getValue(QueryContext context,
StaticOperand operand)
Get the value associated with the static operand of the comparison.
|
PlanNode |
RuleBasedOptimizer.optimize(QueryContext context,
PlanNode plan) |
PlanNode |
Optimizer.optimize(QueryContext context,
PlanNode plan)
Optimize the supplied query plan and produce an executable processor plan.
|
protected Constraint |
RewritePseudoColumns.rewrite(QueryContext context,
Constraint constraint) |
protected DynamicOperand |
RewritePseudoColumns.rewrite(QueryContext context,
DynamicOperand operand) |
protected JoinCondition |
RewritePseudoColumns.rewrite(QueryContext context,
JoinCondition condition) |
protected Constraint |
RewriteAsRangeCriteria.rewrite(QueryContext context,
List<Comparison> comparisons)
Rewrite the supplied comparisons, returning the new constraint and nulling in the supplied list those comparisons that were
rewritten (and leaving those that were not rewritten)
|
protected Constraint |
RewritePathAndNameCriteria.rewriteCriteria(QueryContext context,
Constraint constraint) |
protected void |
RewriteIdentityJoins.rewriteJoinNode(QueryContext context,
PlanNode joinNode,
Map<SelectorName,SelectorName> rewrittenSelectors) |
Modifier and Type | Method and Description |
---|---|
static PlanNode |
PlanUtil.addMissingProjectColumns(QueryContext context,
PlanNode node,
List<Column> allProjectedColumns) |
protected PlanNode |
CanonicalPlanner.attachCriteria(QueryContext context,
PlanNode plan,
Constraint constraint,
List<? extends Column> columns,
Map<String,Subquery> subqueriesByVariableName)
Attach all criteria above the join nodes.
|
protected PlanNode |
CanonicalPlanner.attachDuplicateRemoval(QueryContext context,
PlanNode plan)
Attach DUP_REMOVE node at top of tree.
|
protected PlanNode |
CanonicalPlanner.attachLimits(QueryContext context,
PlanNode plan,
Limit limit)
Attach a LIMIT node at the top of the plan tree.
|
protected PlanNode |
CanonicalPlanner.attachProject(QueryContext context,
PlanNode plan,
List<? extends Column> columns,
Map<SelectorName,Schemata.Table> selectors)
Attach a PROJECT node at the top of the plan tree.
|
protected PlanNode |
CanonicalPlanner.attachSorting(QueryContext context,
PlanNode plan,
List<? extends Ordering> orderings)
Attach SORT node at top of tree.
|
protected PlanNode |
CanonicalPlanner.attachSubqueries(QueryContext context,
PlanNode plan,
Map<String,Subquery> subqueriesByVariableName)
Attach plan nodes for each subquery, resulting with the first subquery at the top of the plan tree.
|
protected PlanNode |
CanonicalPlanner.createCanonicalPlan(QueryContext context,
Query query)
Create a canonical query plan for the given query.
|
protected PlanNode |
CanonicalPlanner.createCanonicalPlan(QueryContext context,
SetQuery query)
Create a canonical query plan for the given set query.
|
PlanNode |
Planner.createPlan(QueryContext context,
QueryCommand query)
Create a canonical query plan for the given command.
|
PlanNode |
CanonicalPlanner.createPlan(QueryContext context,
QueryCommand query) |
protected PlanNode |
CanonicalPlanner.createPlanNode(QueryContext context,
Source source,
Map<SelectorName,Schemata.Table> usedSelectors)
Create a JOIN or SOURCE node that contain the source information.
|
static List<Column> |
PlanUtil.findRequiredColumns(QueryContext context,
PlanNode planNode)
Collected the minimum set of columns from the supplied table that are required by or used within the plan at the supplied
node or above.
|
static List<String> |
PlanUtil.findRequiredColumnTypes(QueryContext context,
List<Column> columns,
PlanNode node) |
static Constraint |
PlanUtil.replaceAliasesWithProperties(QueryContext context,
Constraint constraint,
Map<String,String> propertyByAlias) |
static DynamicOperand |
PlanUtil.replaceAliasesWithProperties(QueryContext context,
DynamicOperand operand,
Map<String,String> propertyByAlias) |
protected static PropertyValue |
PlanUtil.replaceAliasesWithProperties(QueryContext context,
PropertyValue value,
Map<String,String> propertyByAlias) |
static Constraint |
PlanUtil.replaceReferences(QueryContext context,
Constraint constraint,
PlanUtil.ColumnMapping mapping,
PlanNode node) |
static Constraint |
PlanUtil.replaceReferencesToRemovedSource(QueryContext context,
Constraint constraint,
Map<SelectorName,SelectorName> rewrittenSelectors) |
static DynamicOperand |
PlanUtil.replaceReferencesToRemovedSource(QueryContext context,
DynamicOperand operand,
Map<SelectorName,SelectorName> rewrittenSelectors) |
static JoinCondition |
PlanUtil.replaceReferencesToRemovedSource(QueryContext context,
JoinCondition joinCondition,
Map<SelectorName,SelectorName> rewrittenSelectors) |
static void |
PlanUtil.replaceReferencesToRemovedSource(QueryContext context,
PlanNode planNode,
Map<SelectorName,SelectorName> rewrittenSelectors) |
static Constraint |
PlanUtil.replaceSubqueriesWithBindVariables(QueryContext context,
Constraint constraint,
Map<String,Subquery> subqueriesByVariableName) |
static StaticOperand |
PlanUtil.replaceSubqueriesWithBindVariables(QueryContext context,
StaticOperand staticOperand,
Map<String,Subquery> subqueriesByVariableName) |
static DynamicOperand |
PlanUtil.replaceViewReferences(QueryContext context,
DynamicOperand operand,
PlanUtil.ColumnMapping mapping,
PlanNode node) |
static JoinCondition |
PlanUtil.replaceViewReferences(QueryContext context,
JoinCondition joinCondition,
PlanUtil.ColumnMapping mapping,
PlanNode node) |
static void |
PlanUtil.replaceViewReferences(QueryContext context,
PlanNode topOfViewInPlan,
PlanUtil.ColumnMapping mappings) |
protected static void |
PlanUtil.replaceViewReferences(QueryContext context,
PlanNode node,
PlanUtil.ColumnMapping mappings,
SelectorName viewName,
List<PlanNode> potentiallyRemovableSources) |
protected void |
CanonicalPlanner.validate(QueryContext context,
QueryCommand query,
Map<SelectorName,Schemata.Table> usedSelectors)
Validate the supplied query.
|
Modifier and Type | Method and Description |
---|---|
QueryContext |
ProcessingComponent.getContext()
Get the context in which this query is being executed.
|
Modifier and Type | Method and Description |
---|---|
protected static Comparator<Object> |
JoinComponent.comparatorFor(QueryContext context,
ProcessingComponent left,
ProcessingComponent right,
JoinCondition condition)
Create a
Comparable that can be used to compare the values required to evaluate the supplied join condition. |
protected abstract ProcessingComponent |
QueryProcessor.createAccessComponent(QueryCommand originalQuery,
QueryContext context,
PlanNode accessNode,
QueryResults.Columns resultColumns,
ProcessingContextType processingContext)
Create the
ProcessingComponent that processes a single PlanNode.Type.ACCESS branch of a query plan. |
protected ProcessingComponent |
QueryProcessor.createComponent(QueryCommand originalQuery,
QueryContext context,
PlanNode node,
QueryResults.Columns columns,
ProcessingContextType processingContext)
Method that is called to build up the
ProcessingComponent objects that correspond to the optimized query plan. |
protected ProcessingContextType |
QueryProcessor.createProcessingContext(QueryContext queryContext)
A method that can be overridden by subclasses to create a single context object used for all the access queries for a
single query.
|
protected Comparator<Object[]> |
ProcessingComponent.createSortComparator(QueryContext context,
QueryResults.Columns columns) |
protected Comparator<Object[]> |
SortValuesComponent.createSortComparator(QueryContext context,
QueryResults.Columns columns,
List<Ordering> orderings,
Map<SelectorName,SelectorName> sourceNamesByAlias) |
protected Comparator<Object[]> |
SortValuesComponent.createSortComparator(QueryContext context,
QueryResults.Columns columns,
Ordering ordering,
Map<SelectorName,SelectorName> sourceNamesByAlias) |
QueryResults |
QueryEngine.execute(QueryContext context,
QueryCommand query)
Execute the supplied query by planning, optimizing, and then processing it.
|
QueryResults |
QueryProcessor.execute(QueryContext context,
QueryCommand command,
QueryResults.Statistics statistics,
PlanNode plan) |
QueryResults |
Processor.execute(QueryContext context,
QueryCommand command,
QueryResults.Statistics statistics,
PlanNode plan)
Process the supplied query plan for the given command and return the results.
|
Constructor and Description |
---|
Validator(QueryContext context,
Map<SelectorName,Schemata.Table> selectorsByName) |
Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.