Class QueryEngineImpl

  • All Implemented Interfaces:
    QueryEngine

    public abstract class QueryEngineImpl
    extends Object
    implements QueryEngine
    The query engine implementation.
    • Constructor Detail

      • QueryEngineImpl

        public QueryEngineImpl()
    • Method Detail

      • getExecutionContext

        protected abstract ExecutionContext getExecutionContext()
        Get the execution context for a single query execution.
        Returns:
        the context
      • executeQuery

        public Result executeQuery​(String statement,
                                   String language,
                                   Map<String,​? extends PropertyValue> bindings,
                                   Map<String,​String> mappings)
                            throws ParseException
        Description copied from interface: QueryEngine
        Execute a query and get the result. This is a convenience method: no limit, and offset 0.
        Specified by:
        executeQuery in interface QueryEngine
        Parameters:
        statement - the query statement
        language - the language
        bindings - the bind variable value bindings
        mappings - namespace prefix mappings
        Returns:
        the result
        Throws:
        ParseException - if the statement could not be parsed
      • executeQuery

        public Result executeQuery​(String statement,
                                   String language,
                                   Optional<Long> limit,
                                   Optional<Long> offset,
                                   Map<String,​? extends PropertyValue> bindings,
                                   Map<String,​String> mappings)
                            throws ParseException
        Description copied from interface: QueryEngine
        Execute a query and get the result.
        Specified by:
        executeQuery in interface QueryEngine
        Parameters:
        statement - the query statement
        language - the language
        limit - the maximum result set size (may not be negative but may be empty)
        offset - the number of rows to skip (may not be negative but may be empty)
        bindings - the bind variable value bindings
        mappings - namespace prefix mappings
        Returns:
        the result
        Throws:
        ParseException - if the statement could not be parsed
      • executeQuery

        public Result executeQuery​(String statement,
                                   String language,
                                   long limit,
                                   long offset,
                                   Map<String,​? extends PropertyValue> bindings,
                                   Map<String,​String> mappings)
                            throws ParseException
        Description copied from interface: QueryEngine
        Execute a query and get the result.
        Specified by:
        executeQuery in interface QueryEngine
        Parameters:
        statement - the query statement
        language - the language
        limit - the maximum result set size (may not be negative)
        offset - the number of rows to skip (may not be negative)
        bindings - the bind variable value bindings
        mappings - namespace prefix mappings
        Returns:
        the result
        Throws:
        ParseException - if the statement could not be parsed
      • setTraversalEnabled

        protected void setTraversalEnabled​(boolean traversalEnabled)
      • setQuerySelectionMode

        protected void setQuerySelectionMode​(@NotNull
                                             @NotNull QueryEngineImpl.QuerySelectionMode querySelectionMode)
        Instruct the query engine on how to behave with regards to the SQL2 optimised query if available.
        Parameters:
        querySelectionMode - cannot be null