Interface QueryDelegatableData

All Known Implementing Classes:
RDBMSStore

public interface QueryDelegatableData
Data source able to delegate the evaluation of higher-level queries.
  • Method Details

    • isEvaluable

      boolean isEvaluable(Query query)
      Checks if a query can be evaluated
      Parameters:
      query - the query to check
      Returns:
      true iff tryEvaluate returns a non-empty optional
    • evaluate

      Stream<Substitution> evaluate(Query query, boolean distinct) throws EvaluationException
      Try to evaluate a basic query
      Parameters:
      query - the query to evaluate
      distinct - whether duplicate substitutions should be filtered out
      Returns:
      Empty if the query is not evaluable, otherwise a stream containing substitutions that are the answers to the query
      Throws:
      EvaluationException - if delegated evaluation fails
    • evaluate

      default Stream<Substitution> evaluate(Query query) throws EvaluationException
      Try to evaluate a basic query
      Parameters:
      query - the query to evaluate
      Returns:
      Empty if the query is not evaluable, otherwise a stream containing substitutions that are the answers to the query
      Throws:
      EvaluationException - if delegated evaluation fails