Class QueryContext

java.lang.Object
org.eclipse.rdf4j.query.algebra.evaluation.QueryContext

public class QueryContext extends Object
A QueryContext provides a means to pass arbitrary local state to a Function or TupleFunction. The implementation of
invalid @link
org.eclipse.rdf4j.sail.SailConnection#evaluate()
is responsible for initialising a QueryContext and making it available during evaluation via QueryContextIteration. A QueryContext is commonly used to provide a QueryPreparer for the current SailConnection. This allows, for example, Functions to be written that conveniently express more complex queries.
  • Constructor Details

    • QueryContext

      public QueryContext()
    • QueryContext

      public QueryContext(QueryPreparer qp)
  • Method Details

    • getQueryContext

      public static QueryContext getQueryContext()
    • begin

      public void begin()
    • getQueryPreparer

      public QueryPreparer getQueryPreparer()
    • setAttribute

      public void setAttribute(String name, Object value)
    • getAttribute

      public <T> T getAttribute(String name)
    • end

      public void end()