Package com.mckoi.database
Class SystemQueryContext
- java.lang.Object
-
- com.mckoi.database.AbstractQueryContext
-
- com.mckoi.database.SystemQueryContext
-
- All Implemented Interfaces:
QueryContext
final class SystemQueryContext extends AbstractQueryContext
A QueryContext that only wraps around a TransactionSystem and does not provide implementations for the 'getTable', and 'getDatabase' methods.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
current_schema
The context schema of this context.private TransactionSystem
system
The wrapped TransactionSystem object.private SimpleTransaction
transaction
The Transaction this is a part of.
-
Constructor Summary
Constructors Constructor Description SystemQueryContext(SimpleTransaction transaction, java.lang.String current_schema)
Constructs the QueryContext.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
currentSequenceValue(java.lang.String name)
Returns the current sequence value returned for the given sequence generator within the connection defined by this context.FunctionLookup
getFunctionLookup()
Returns the system FunctionLookup object.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 name)
Increments the sequence generator and returns the next unique key.long
nextUniqueID(java.lang.String table_name)
Returns a unique key for the given table source in the database.void
setSequenceValue(java.lang.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
-
-
-
-
Field Detail
-
system
private TransactionSystem system
The wrapped TransactionSystem object.
-
transaction
private SimpleTransaction transaction
The Transaction this is a part of.
-
current_schema
private java.lang.String current_schema
The context schema of this context.
-
-
Constructor Detail
-
SystemQueryContext
SystemQueryContext(SimpleTransaction transaction, java.lang.String current_schema)
Constructs the QueryContext.
-
-
Method Detail
-
getSystem
public TransactionSystem getSystem()
Returns a TransactionSystem object that is used to determine information about the transactional system.
-
getFunctionLookup
public FunctionLookup getFunctionLookup()
Returns the system FunctionLookup object.
-
nextSequenceValue
public long nextSequenceValue(java.lang.String name)
Increments the sequence generator and returns the next unique key.
-
currentSequenceValue
public long currentSequenceValue(java.lang.String 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
public void setSequenceValue(java.lang.String name, long value)
Sets the current sequence value for the given sequence generator.
-
nextUniqueID
public long nextUniqueID(java.lang.String table_name)
Returns a unique key for the given table source in the database.
-
getUserName
public java.lang.String getUserName()
Returns the user name of the connection.
-
-