org.modeshape.graph.query
Class QueryEngine
java.lang.Object
org.modeshape.graph.query.QueryEngine
- All Implemented Interfaces:
- Queryable
@ThreadSafe
public class QueryEngine
- extends Object
- implements Queryable
A query engine that is able to execute formal queries expressed in the Graph API's Abstract Query Model.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QueryEngine
public QueryEngine(Planner planner,
Optimizer optimizer,
Processor processor)
- Create a new query engine given the
planner, optimizer, processor, and
schemata.
- Parameters:
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 results
- Throws:
IllegalArgumentException - if the processor reference is null
execute
public QueryResults execute(QueryContext context,
QueryCommand query)
- Execute the supplied query by planning, optimizing, and then processing it.
- Specified by:
execute in interface Queryable
- Parameters:
context - the context in which the query should be executedquery - the query that is to be executed
- Returns:
- the query results; never null
- See Also:
Queryable.execute(org.modeshape.graph.query.QueryContext,
org.modeshape.graph.query.model.QueryCommand)
determineQueryResultColumns
protected QueryResultColumns determineQueryResultColumns(PlanNode optimizedPlan,
PlanHints hints)
Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.