@ThreadSafe public class QueryEngine extends Object
Abstract Query Model
.Modifier and Type | Field and Description |
---|---|
protected Optimizer |
optimizer |
protected Planner |
planner |
protected Processor |
processor |
Constructor and Description |
---|
QueryEngine(Planner planner,
Optimizer optimizer,
Processor processor)
|
Modifier and Type | Method and Description |
---|---|
protected QueryResultColumns |
determineQueryResultColumns(PlanNode optimizedPlan,
PlanHints hints) |
QueryResults |
execute(QueryContext context,
QueryCommand query)
Execute the supplied query by planning, optimizing, and then processing it.
|
protected final Planner planner
protected final Optimizer optimizer
protected final Processor processor
public QueryEngine(Planner planner, Optimizer optimizer, Processor processor)
planner
- the planner that should be used to generate canonical query plans for the queries; may be null if the
CanonicalPlanner
should be usedoptimizer
- the optimizer that should be used to optimize the canonical query plan; may be null if the
RuleBasedOptimizer
should be usedprocessor
- the processor implementation that should be used to process the planned query and return the resultsIllegalArgumentException
- if the processor reference is nullpublic QueryResults execute(QueryContext context, QueryCommand query) throws QueryCancelledException, RepositoryException
context
- the context in which the query should be executedquery
- the query that is to be executedIllegalArgumentException
- if the context or query references are nullQueryCancelledException
- if the query was cancelledRepositoryException
- if there was a problem executing the queryprotected QueryResultColumns determineQueryResultColumns(PlanNode optimizedPlan, PlanHints hints)
Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.