Package com.stardog.stark.query.exec
Interface QueryEngine
- All Superinterfaces:
AutoCloseable
Interface for something that is able to execute and explain queries.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Michael Grove
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()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, Runnable theHandler) Execute the givenquery.Explain the givenquery
-
Method Details
-
close
void close()Close this query engine and free up any resources it holds- Specified by:
closein interfaceAutoCloseable
-
exec
void exec(@Nonnull SelectQuery theQuery, @Nonnull SelectQueryResultHandler theHandler) throws MalformedQuery, QueryExecutionFailure Execute 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, QueryExecutionFailure Execute 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, QueryExecutionFailure Execute 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 Runnable theHandler) throws MalformedQuery, QueryExecutionFailure Execute 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
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
-