Class HTTPBooleanQuery
- All Implemented Interfaces:
BooleanQuery, Operation, Query
- Author:
- Arjohn Kampman
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface Query
Query.QueryTypeModifier and TypeInterfaceDescriptionstatic enumThe different types of queries that RDF4J recognizes: boolean queries, graph queries, and tuple queries. -
Field Summary
Fields inherited from class AbstractHTTPQuery
baseURI, queryLanguage, queryStringModifier and TypeFieldDescriptionprotected final Stringprotected final QueryLanguageprotected final StringFields inherited from class AbstractOperation
bindings, dataset, includeInferredModifier and TypeFieldDescriptionprotected final MapBindingSetprotected Datasetprotected boolean -
Constructor Summary
ConstructorsConstructorDescriptionHTTPBooleanQuery(org.eclipse.rdf4j.repository.http.HTTPRepositoryConnection conn, QueryLanguage ql, String queryString, String baseURI) -
Method Summary
Modifier and TypeMethodDescriptionbooleanevaluate()explain(Explanation.Level level) Explain how the query will be (or has been) executed/evaluated by returning an explanation of the query plan.Methods inherited from class AbstractHTTPQuery
getBindingsArray, getHttpClient, setMaxExecutionTime, toStringModifier and TypeMethodDescriptionBinding[]protected SPARQLProtocolSessionvoidsetMaxExecutionTime(int maxExecutionTimeSeconds) Specifies the maximum time that an operation is allowed to run.toString()Methods inherited from class AbstractQuery
getMaxQueryTime, setMaxQueryTimeModifier and TypeMethodDescriptionintDeprecated.voidsetMaxQueryTime(int maxQueryTimeSeconds) Deprecated.Methods inherited from class AbstractOperation
clearBindings, getBindings, getDataset, getIncludeInferred, getMaxExecutionTime, removeBinding, setBinding, setDataset, setIncludeInferredModifier and TypeMethodDescriptionvoidRemoves all previously set bindings.Retrieves the bindings that have been set on this operation.Gets the dataset that has been set usingOperation.setDataset(Dataset), if any.booleanReturns whether or not this operation will return inferred statements (if any are present in the repository).intReturns the maximum operation execution time.voidremoveBinding(String name) Removes a previously set binding on the supplied variable.voidsetBinding(String name, Value value) Binds the specified variable to the supplied value.voidsetDataset(Dataset dataset) Specifies the dataset against which to execute an operation, overriding any dataset that is specified in the operation itself.voidsetIncludeInferred(boolean includeInferred) Determine whether evaluation results of this operation should include inferred statements (if any inferred statements are present in the repository).
-
Constructor Details
-
HTTPBooleanQuery
public HTTPBooleanQuery(org.eclipse.rdf4j.repository.http.HTTPRepositoryConnection conn, QueryLanguage ql, String queryString, String baseURI)
-
-
Method Details
-
evaluate
- Specified by:
evaluatein interfaceBooleanQuery- Throws:
QueryEvaluationException
-
explain
Description copied from interface:QueryExplain how the query will be (or has been) executed/evaluated by returning an explanation of the query plan.
This method is useful for understanding why a particular query is slow. The most useful level is Executed, but this takes as long as it takes to execute/evaluate the query.
When timing a query you should keep in mind that the query performance will vary based on how much the JIT compiler has compiled the code (C1 vs C2) and based on what is or isn't cached in memory. If Timed explanations are considerably slower than Executed explanations the overhead with timing the query may be large on your system and should not be trusted.
WARNING: This method is experimental and is subject to change or removal without warning. Same goes for the returned explanation. There is currently only partial support for this method in RDF4J and and UnsupportedOperationException where support is lacking.
- Specified by:
explainin interfaceQuery- Parameters:
level- The explanation level that should be used to create the explanation. Choose between: Unoptimized (as parsed without optimizations) , Optimized (as is actually going to be used), Executed (as was executed/evaluated with actual result sizes), Telemetry (as was executed/evaluated, including runtime telemetry metrics), Timed (as was executed/evaluated including timing for each plan node). Executed, Telemetry and Timed levels can potentially be slow.- Returns:
- The explanation that we generated, which can be viewed in a human readable format with toString(), as JSON or as a simplified query plan object structure.
-