Package com.mckoi.database
Interface QueryContext
-
- All Known Implementing Classes:
AbstractQueryContext,DatabaseQueryContext
public interface QueryContextFacts 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 voidaddMarkedTable(java.lang.String mark_name, Table table)Marks a table in a query plan.voidclearCache()Clears the cache of any cached tables.longcurrentSequenceValue(java.lang.String generator_name)Returns the current sequence value returned for the given sequence generator within the connection defined by this context.TablegetCachedNode(long id)Returns a cached table or null if it isn't cached.FunctionLookupgetFunctionLookup()Returns a FunctionLookup object used to convert FunctionDef objects to Function objects when evaluating an expression.TablegetMarkedTable(java.lang.String mark_name)Returns a table that was marked in a query plan or null if no mark was found.TransactionSystemgetSystem()Returns a TransactionSystem object that is used to determine information about the transactional system.java.lang.StringgetUserName()Returns the user name of the connection.longnextSequenceValue(java.lang.String generator_name)Increments the sequence generator and returns the next unique key.voidputCachedNode(long id, Table table)Put a Table into the cache.voidsetSequenceValue(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.
-
-