Interface QueryContext

  • All Known Implementing Classes:
    AbstractQueryContext, DatabaseQueryContext

    public interface QueryContext
    Facts about a particular query including the root table sources, user name of the controlling context, sequence state, etc.
    Author:
    Tobias Downer
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addMarkedTable​(java.lang.String mark_name, Table table)
      Marks a table in a query plan.
      void clearCache()
      Clears the cache of any cached tables.
      long currentSequenceValue​(java.lang.String generator_name)
      Returns the current sequence value returned for the given sequence generator within the connection defined by this context.
      Table getCachedNode​(long id)
      Returns a cached table or null if it isn't cached.
      FunctionLookup getFunctionLookup()
      Returns a FunctionLookup object used to convert FunctionDef objects to Function objects when evaluating an expression.
      Table getMarkedTable​(java.lang.String mark_name)
      Returns a table that was marked in a query plan or null if no mark was found.
      TransactionSystem getSystem()
      Returns a TransactionSystem object that is used to determine information about the transactional system.
      java.lang.String getUserName()
      Returns the user name of the connection.
      long nextSequenceValue​(java.lang.String generator_name)
      Increments the sequence generator and returns the next unique key.
      void putCachedNode​(long id, Table table)
      Put a Table into the cache.
      void setSequenceValue​(java.lang.String generator_name, long value)
      Sets the current sequence value for the given sequence generator.
    • Method Detail

      • getSystem

        TransactionSystem getSystem()
        Returns a TransactionSystem object that is used to determine information about the transactional system.
      • getUserName

        java.lang.String getUserName()
        Returns the user name of the connection.
      • getFunctionLookup

        FunctionLookup getFunctionLookup()
        Returns a FunctionLookup object used to convert FunctionDef objects to Function objects when evaluating an expression.
      • nextSequenceValue

        long nextSequenceValue​(java.lang.String generator_name)
        Increments the sequence generator and returns the next unique key.
      • currentSequenceValue

        long currentSequenceValue​(java.lang.String generator_name)
        Returns the current sequence value returned for the given sequence generator within the connection defined by this context. If a value was not returned for this connection then a statement exception is generated.
      • setSequenceValue

        void setSequenceValue​(java.lang.String generator_name,
                              long value)
        Sets the current sequence value for the given sequence generator.
      • addMarkedTable

        void addMarkedTable​(java.lang.String mark_name,
                            Table table)
        Marks a table in a query plan.
      • getMarkedTable

        Table getMarkedTable​(java.lang.String mark_name)
        Returns a table that was marked in a query plan or null if no mark was found.
      • putCachedNode

        void putCachedNode​(long id,
                           Table table)
        Put a Table into the cache.
      • getCachedNode

        Table getCachedNode​(long id)
        Returns a cached table or null if it isn't cached.
      • clearCache

        void clearCache()
        Clears the cache of any cached tables.