Package com.mckoi.database
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
Modifier and TypeMethodDescriptionvoid
addMarkedTable
(String mark_name, Table table) Marks a table in a query plan.void
Clears the cache of any cached tables.long
currentSequenceValue
(String generator_name) Returns the current sequence value returned for the given sequence generator within the connection defined by this context.getCachedNode
(long id) Returns a cached table or null if it isn't cached.Returns a FunctionLookup object used to convert FunctionDef objects to Function objects when evaluating an expression.getMarkedTable
(String mark_name) Returns a table that was marked in a query plan or null if no mark was found.Returns a TransactionSystem object that is used to determine information about the transactional system.Returns the user name of the connection.long
nextSequenceValue
(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
(String generator_name, long value) Sets the current sequence value for the given sequence generator.
-
Method Details
-
getSystem
TransactionSystem getSystem()Returns a TransactionSystem object that is used to determine information about the transactional system. -
getUserName
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
Increments the sequence generator and returns the next unique key. -
currentSequenceValue
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
Sets the current sequence value for the given sequence generator. -
addMarkedTable
Marks a table in a query plan. -
getMarkedTable
Returns a table that was marked in a query plan or null if no mark was found. -
putCachedNode
Put a Table into the cache. -
getCachedNode
Returns a cached table or null if it isn't cached. -
clearCache
void clearCache()Clears the cache of any cached tables.
-