Package com.mckoi.database
Class DatabaseQueryContext
java.lang.Object
com.mckoi.database.AbstractQueryContext
com.mckoi.database.DatabaseQueryContext
- All Implemented Interfaces:
QueryContext
An implementation of a QueryContext based on a DatabaseConnection object.
- Author:
- Tobias Downer
-
Constructor Summary
ConstructorsConstructorDescriptionDatabaseQueryContext
(DatabaseConnection database) Constructs the QueryContext. -
Method Summary
Modifier and TypeMethodDescriptionCreates a QueryPlanNode for the view with the given name.long
currentSequenceValue
(String name) Returns the current sequence value returned for the given sequence generator within the connection defined by this context.Returns the Database object that this context is a child of.getDataTableDef
(TableName name) Returns a DataTableDef for the given table name.Returns the system FunctionLookup object.Returns the GrantManager object that is used to determine grant information for the database.Returns a TransactionSystem object that is used to determine information about the transactional system.Returns a DataTable from the database with the given table name.Returns the user name of the connection.long
nextSequenceValue
(String name) Increments the sequence generator and returns the next unique key.void
setSequenceValue
(String name, long value) Sets the current sequence value for the given sequence generator.Methods inherited from class com.mckoi.database.AbstractQueryContext
addMarkedTable, clearCache, getCachedNode, getMarkedTable, putCachedNode
-
Constructor Details
-
DatabaseQueryContext
Constructs the QueryContext.
-
-
Method Details
-
getDatabase
Returns the Database object that this context is a child of. -
getSystem
Returns a TransactionSystem object that is used to determine information about the transactional system. -
getFunctionLookup
Returns the system FunctionLookup object. -
getGrantManager
Returns the GrantManager object that is used to determine grant information for the database. -
getTable
Returns a DataTable from the database with the given table name. -
getDataTableDef
Returns a DataTableDef for the given table name. -
createViewQueryPlanNode
Creates a QueryPlanNode for the view with the given name. -
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. -
getUserName
Returns the user name of the connection.
-