Package com.stardog.stark.query.exec
Interface QueryEngine
-
- All Superinterfaces:
java.lang.AutoCloseable
public interface QueryEngine extends java.lang.AutoCloseableInterface for something that is able to execute and explain
queries.- Since:
- 1.0
- Version:
- 1.0
- Author:
- Michael Grove
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Close this query engine and free up any resources it holdsvoidexec(BooleanQuery theQuery, BooleanQueryResultHandler theHandler)Execute the givenquery.voidexec(GraphQuery theQuery, RDFHandler theHandler)Execute the givenquery.voidexec(SelectQuery theQuery, SelectQueryResultHandler theHandler)Execute the givenquery.voidexec(UpdateQuery theQuery, java.lang.Runnable theHandler)Execute the givenquery.QueryPlanexplain(Query theQuery)Explain the givenquery
-
-
-
Method Detail
-
close
void close()
Close this query engine and free up any resources it holds- Specified by:
closein interfacejava.lang.AutoCloseable
-
exec
void exec(@Nonnull SelectQuery theQuery, @Nonnull SelectQueryResultHandler theHandler) throws MalformedQuery, QueryExecutionFailureExecute the givenquery.- Parameters:
theQuery- the query to execute- Throws:
QueryExecutionFailure- if there is an error while executing the queryMalformedQuery- The `Query` could be created such that it was not parsed initially and the executor will parse the query prior to execution- Implementation Requirements:
- The query, if not already parsed, will first be parsed. Then the query will be executed, either synchronously or asynchronously, depending on the implementation of this `QueryEngine`. The results as they are computed will be forwarded to `theHandler`. Should any exception arise during execution it will be passed to `theErrorHandler` before execution is terminated; `theHandler` will receive no more results after `theErrorHandler` has been called.
-
exec
void exec(@Nonnull GraphQuery theQuery, @Nonnull RDFHandler theHandler) throws MalformedQuery, QueryExecutionFailureExecute the givenquery.- Parameters:
theQuery- the query to execute- Throws:
QueryExecutionFailure- if there is an error while executing the queryMalformedQuery- The `Query` could be created such that it was not parsed initially and the executor will parse the query prior to execution
-
exec
void exec(@Nonnull BooleanQuery theQuery, @Nonnull BooleanQueryResultHandler theHandler) throws MalformedQuery, QueryExecutionFailureExecute the givenquery.- Parameters:
theQuery- the query to execute- Throws:
QueryExecutionFailure- if there is an error while executing the queryMalformedQuery- The `Query` could be created such that it was not parsed initially and the executor will parse the query prior to execution
-
exec
void exec(@Nonnull UpdateQuery theQuery, @Nonnull java.lang.Runnable theHandler) throws MalformedQuery, QueryExecutionFailureExecute the givenquery.- Parameters:
theQuery- the query to execute- Throws:
QueryExecutionFailure- if there is an error while executing the queryMalformedQuery- The `Query` could be created such that it was not parsed initially and the executor will parse the query prior to execution
-
explain
@Nonnull QueryPlan explain(@Nonnull Query theQuery)
Explain the givenquery- Parameters:
theQuery- the query to explain- Returns:
- the query plan
- Throws:
MalformedQuery- The `Query` could be created such that it was not parsed initially and the executor will parse the query prior to retrieving the plan
-
-