|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LanguageConnectionContext
LanguageConnectionContext keeps the result sets, and activations in use by the current connection.
More stable items, like other factories, are accessible through the LanguageConnectionFactory or the LanguageFactory.
LanguageConnectionFactory
,
LanguageFactory
Field Summary | |
---|---|
static int |
ANSI_CASING
|
static int |
ANTI_ANSI_CASING
|
static java.lang.String |
CONTEXT_ID
this is the ID we expect these contexts to be stored into a context manager under. |
static java.lang.String |
dbnameStr
|
static java.lang.String |
drdaStr
|
static java.lang.String |
lccStr
|
static int |
MULTI_TRANSACTION_LOCK
|
static int |
NO_SCHEMAS
|
static int |
OUTERMOST_STATEMENT
|
static int |
SINGLE_TRANSACTION_LOCK
|
static int |
SQL92_SCHEMAS
|
static int |
UNKNOWN_CASING
|
static int |
USER_NAME_SCHEMA
|
static java.lang.String |
xidStr
|
Method Summary | |
---|---|
void |
addActivation(Activation a)
Add the activation to those known about by this connection. |
void |
addDeclaredGlobalTempTable(TableDescriptor td)
Add the declared global temporary table to the list of temporary tables known by this connection. |
void |
appendOptimizerTraceOutput(java.lang.String output)
Append the latest output to the optimizer trace output. |
void |
autoincrementCreateCounter(java.lang.String s,
java.lang.String t,
java.lang.String c,
java.lang.Long initialValue,
long increment,
int position)
Create an autoincrement counter to be used on behalf of a SQL-J statement. |
void |
autoincrementFlushCache(UUID tableUUID)
Flush the cache of autoincrement values being kept by the lcc. |
void |
beginNestedTransaction(boolean readOnly)
Begin a nested transaction. |
boolean |
checkIfAnyDeclaredGlobalTempTablesForThisConnection()
Check if there are any global temporary tables declared for this connection. |
void |
closeUnusedActivations()
Close any unused activations in this connection context. |
void |
commitNestedTransaction()
commit a nested transaction. |
void |
copyHashtableToAIHT(java.util.Map from)
Copy a map of autoincrement key value pairs into the cache of ai values stored in the language connection context. |
SQLSessionContext |
createSQLSessionContext()
Create a fresh SQLSessionContext for this connection. |
boolean |
dataDictionaryInWriteMode()
Return true if the data dictionary is in write mode (that is, this context was informed that is is in write mode by the method call setDataDictionaryWriteMode(). |
int |
decrementBindCount()
Decrement the DataDictionary bind count. |
boolean |
dropDeclaredGlobalTempTable(java.lang.String tableName)
Drop (mark the declared global temporary table for dropping) from the list of temporary tables known by this connection. |
int |
getActivationCount()
Return the number of activation known for this connection. |
ASTVisitor |
getASTVisitor()
Get the Visitor which should walk the AST. |
java.lang.String |
getAuthorizationId()
Get the Authorization Id |
Authorizer |
getAuthorizer()
Get an Authorizer for this connection. |
boolean |
getAutoincrementUpdate()
Returns the current value of autoincrementUpdate. |
int |
getBindCount()
Get the DataDictionary bind count. |
int |
getCurrentIsolationLevel()
Get the current isolation level. |
java.lang.String |
getCurrentIsolationLevelStr()
Get the current isolation level in DB2 format. |
java.lang.String |
getCurrentRoleId(Activation a)
Get the current role authorization identifier of the dynamic call context associated with this activation. |
java.lang.String |
getCurrentRoleIdDelimited(Activation a)
Get the current role authorization identifier in external delimited form (not case normal form) of the dynamic call context associated with this activation. |
java.lang.String |
getCurrentSchemaName()
Get the current schema name (at compile-time, see explanations for getDefaultSchema overloads). |
java.lang.String |
getCurrentSchemaName(Activation a)
Get the current schema name (at execution time, see explanations for getDefaultSchema overloads); This version is used by CURRENT SCHEMA. |
Database |
getDatabase()
Returns the Database of this connection. |
DataDictionary |
getDataDictionary()
Get the data dictionary |
DataValueFactory |
getDataValueFactory()
Get the data value factory to use with this language connection context. |
java.lang.String |
getDbname()
Get the database name of this LCC. |
SchemaDescriptor |
getDefaultSchema()
Get the default schema (used at compile-time when no activation is yet available, cf. the activation argument overload version. |
SchemaDescriptor |
getDefaultSchema(Activation a)
Get the default schema (used at execution time). |
java.lang.String |
getDrdaID()
Get the DRDA ID of this LCC. |
java.lang.Long |
getIdentityValue()
Get the identity column value most recently generated. |
int |
getInstanceNumber()
Get the instance number of this LCC. |
LanguageConnectionFactory |
getLanguageConnectionFactory()
Get the language connection factory to use with this language connection context. |
LanguageFactory |
getLanguageFactory()
Get the language factory to use with this language connection context. |
Activation |
getLastActivation()
Return the last activation added This is used to find the drop activation in dropViewCascade so we can add warning messages to the activation |
java.lang.Object |
getLastQueryTree()
Debug method for retrieving the last query tree. |
int |
getLockEscalationThreshold()
get the lock escalation threshold to use with this connection. |
boolean |
getLogQueryPlan()
Get value of logQueryPlan. |
boolean |
getLogStatementText()
Get value of logStatementText. |
OptimizerFactory |
getOptimizerFactory()
get the optimizer factory to use with this language connection context. |
boolean |
getOptimizerTrace()
Get whether or not optimizer trace is on. |
boolean |
getOptimizerTraceHtml()
Get whether or not optimizer trace html is on. |
java.lang.String |
getOptimizerTraceOutput()
Get the optimizer trace output for the last optimized query as a String. |
int |
getPrepareIsolationLevel()
Get the prepare isolation level. |
java.util.Map |
getPrintedObjectsMap()
Return a map of AST nodes that have already been printed during a compiler phase, so as to be able to avoid printing a node more than once. |
boolean |
getRunTimeStatisticsMode()
Get the RUNTIMESTATISTICS mode. |
RunTimeStatistics |
getRunTimeStatisticsObject()
Get the RUNTIMESTATISTICS object. |
StatementContext |
getStatementContext()
Get the current StatementContext. |
int |
getStatementDepth()
Reports how many statement levels deep we are. |
boolean |
getStatisticsTiming()
Get the STATISTICS TIMING mode. |
TableDescriptor |
getTableDescriptorForDeclaredGlobalTempTable(java.lang.String tableName)
Get table descriptor for the declared global temporary table from the list of temporary tables known by this connection. |
SQLSessionContext |
getTopLevelSQLSessionContext()
Get the value of top level session context of the top level connection. |
TransactionController |
getTransactionCompile()
Get the transaction controller to use with this language connection context at compile time. |
TransactionController |
getTransactionExecute()
Get the transaction controller to use with this language connection context during execute time. |
TriggerExecutionContext |
getTriggerExecutionContext()
Get the topmost tec. |
TableDescriptor |
getTriggerTable()
Get the topmost trigger table descriptor |
java.lang.String |
getUniqueCursorName()
Get a connection unique system generated name for a cursor. |
int |
getUniqueSavepointID()
Get a connection unique system generated id for an unnamed savepoint. |
java.lang.String |
getUniqueSavepointName()
Get a connection unique system generated name for an unnamed savepoint. |
boolean |
getXplainOnlyMode()
gets the current set XplainOnlyMode |
java.lang.String |
getXplainSchema()
gets the current set XplainSchema |
java.lang.Object |
getXplainStatement(java.lang.Object key)
|
int |
incrementBindCount()
Increment the DataDictionary bind count. |
void |
initialize()
Initialize. |
void |
internalCommit(boolean commitStore)
Do a commit, as internally needed by Derby. |
void |
internalCommitNoSync(int commitflag)
Similar to internalCommit() but has logic for an unsynchronized commit |
void |
internalRollback()
Do a rollback, as internally needed by Derby. |
void |
internalRollbackToSavepoint(java.lang.String savepointName,
boolean refreshStyle,
java.lang.Object kindOfSavepoint)
Let the context deal with a rollback to savepoint |
boolean |
isInitialDefaultSchema(java.lang.String schemaName)
Return true if this schema name is the initial default schema for the current session. |
boolean |
isIsolationLevelSetUsingSQLorJDBC()
Returns true if isolation level has been set using JDBC/SQL. |
boolean |
isReadOnly()
Get the readOnly status for the current connection. |
boolean |
isTransactionPristine()
Reports whether there is any outstanding work in the transaction. |
void |
languageSetSavePoint(java.lang.String savepointName,
java.lang.Object kindOfSavepoint)
Sets a savepoint. |
java.lang.Long |
lastAutoincrementValue(java.lang.String schemaName,
java.lang.String tableName,
java.lang.String columnName)
Returns the last autoincrement value inserted by this connection. |
CursorActivation |
lookupCursorActivation(java.lang.String cursorName)
See if a given cursor is available for use. |
void |
markTempTableAsModifiedInUnitOfWork(java.lang.String tableName)
Mark the passed temporary table as modified in the current unit of work. |
long |
nextAutoincrementValue(java.lang.String schemaName,
java.lang.String tableName,
java.lang.String columnName)
returns the next value to be inserted into an autoincrement col. |
void |
notifyUnusedActivation()
Make a note that some activations are marked unused |
void |
popCompilerContext(CompilerContext compilerContext)
Pop a CompilerContext off the context stack. |
void |
popExecutionStmtValidator(ExecutionStmtValidator validator)
Remove the validator. |
void |
popStatementContext(StatementContext statementContext,
java.lang.Throwable error)
Pop a StatementContext of the context stack. |
void |
popTriggerExecutionContext(TriggerExecutionContext tec)
Remove the tec. |
void |
popTriggerTable(TableDescriptor td)
Remove the trigger table descriptor. |
PreparedStatement |
prepareInternalStatement(SchemaDescriptor compilationSchema,
java.lang.String sqlText,
boolean isForReadOnly,
boolean allowInternalSyntax)
Return a PreparedStatement object for the query. |
PreparedStatement |
prepareInternalStatement(java.lang.String sqlText)
Return a PreparedStatement object for the query. |
CompilerContext |
pushCompilerContext()
Push a CompilerContext on the context stack with the current default schema as the default schema which we compile against. |
CompilerContext |
pushCompilerContext(SchemaDescriptor sd)
Push a CompilerContext on the context stack with the passed in default schema as the default schema we compile against. |
void |
pushExecutionStmtValidator(ExecutionStmtValidator validator)
Push a new execution statement validator. |
StatementContext |
pushStatementContext(boolean isAtomic,
boolean isForReadOnly,
java.lang.String stmtText,
ParameterValueSet pvs,
boolean rollbackParentContext,
long timeoutMillis)
Push a StatementContext on the context stack. |
void |
pushTriggerExecutionContext(TriggerExecutionContext tec)
Push a new trigger execution context. |
void |
pushTriggerTable(TableDescriptor td)
Set the trigger table descriptor. |
void |
releaseSavePoint(java.lang.String savepointName,
java.lang.Object kindOfSavepoint)
Let the context deal with a release of a savepoint |
void |
removeActivation(Activation a)
Remove the activation from those known about by this connection. |
void |
resetFromPool()
Reset the connection before it is returned (indirectly) by a PooledConnection object. |
void |
resetIsolationLevelFlagUsedForSQLandJDBC()
Reset the isolation level flag used to keep correct isolation level state in BrokeredConnection. |
void |
resetSchemaUsages(Activation activation,
java.lang.String schemaName)
Reset any occurence of schemaName as current default schema in the SQLSessionContext stack to the initial default, because schemaName is no longer a valid schema. |
boolean |
roleIsSettable(java.lang.String role)
Checks whether the given role can be legally set for the current user. |
void |
setASTVisitor(ASTVisitor visitor)
Set a Visitor which walks the AST at various stages. |
void |
setAutoincrementUpdate(boolean flag)
Sets autoincrementUpdate-- this variable allows updates to autoincrement columns if it is set to true. |
void |
setCurrentRole(Activation a,
java.lang.String role)
Set the current role |
void |
setDataDictionaryWriteMode()
Remember that the DataDictionary is in write mode, so we can take it out of write mode at the end of the transaction. |
void |
setDefaultSchema(Activation a,
SchemaDescriptor sd)
Set the default schema (at execution time, see explanations for getDefaultSchema overloads); This version is used by SET SCHEMA. |
void |
setDefaultSchema(SchemaDescriptor sd)
Set the default schema (at compile-time, see explanations for getDefaultSchema overloads). |
void |
setDrdaID(java.lang.String drdaID)
Set the DRDA ID of this LCC. |
void |
setIdentityValue(long val)
Set the field of most recently generated identity column value. |
void |
setIsolationLevel(int isolationLevel)
Set current isolation level. |
void |
setLastQueryTree(java.lang.Object queryTree)
Debug method for remembering the last query tree. |
void |
setLogStatementText(boolean logStatementText)
Set value of logStatementText (Whether or not to write info on currently executing statement to error log.) |
boolean |
setOptimizerTrace(boolean onOrOff)
Control whether or not optimizer trace is on. |
boolean |
setOptimizerTraceHtml(boolean onOrOff)
Control whether or not optimizer trace is generated in html. |
void |
setOptimizerTraceOutput(java.lang.String startingText)
Set the optimizer trace output to the specified String. |
void |
setPrepareIsolationLevel(int isolationLevel)
|
void |
setReadOnly(boolean onOrOff)
Set the readOnly status for the current connection. |
void |
setRunTimeStatisticsMode(boolean onOrOff)
Turn RUNTIMESTATISTICS on or off. |
void |
setRunTimeStatisticsObject(RunTimeStatistics runTimeStatisticsObject)
Set the RUNTIMESTATISTICS object. |
void |
setStatisticsTiming(boolean onOrOff)
Turn STATISTICS TIMING on or off. |
void |
setupNestedSessionContext(Activation a)
Create a new SQL session context for the current activation on the basis of the existing SQL session context. |
void |
setupSubStatementSessionContext(Activation a)
Used when a statement as part of its operation executes an other statement. |
void |
setXplainOnlyMode(boolean onOrOff)
sets the XplainOnlyMode. |
void |
setXplainSchema(java.lang.String schema)
sets the XplainSchema |
void |
setXplainStatement(java.lang.Object key,
java.lang.Object stmt)
|
void |
userCommit()
Do a commit, as issued directly by a user (e.g. via Connection.commit() or the JSQL 'COMMIT' statement. |
void |
userRollback()
Do a rollback, as issued directly by a user (e.g. via Connection.rollback() or the JSQL 'ROLLBACK' statement. |
boolean |
usesSqlAuthorization()
Check if in SQL standard mode, with support for Grant & Revoke |
void |
validateStmtExecution(ConstantAction constantAction)
Validate a statement. |
boolean |
verifyAllHeldResultSetsAreClosed()
Verify that there are no activations with open held result sets. |
boolean |
verifyNoOpenResultSets(PreparedStatement pStmt,
Provider provider,
int action)
Verify that there are no activations with open result sets on the specified prepared statement. |
void |
xaCommit(boolean onePhase)
Commit a distrubuted transaction. |
void |
xaRollback()
Roll back a distrubuted transaction. |
Methods inherited from interface org.apache.derby.iapi.services.context.Context |
---|
cleanupOnError, getContextManager, getIdName, isLastHandler, popMe, pushMe |
Field Detail |
---|
static final java.lang.String CONTEXT_ID
static final int OUTERMOST_STATEMENT
static final int SQL92_SCHEMAS
static final int USER_NAME_SCHEMA
static final int NO_SCHEMAS
static final java.lang.String xidStr
static final java.lang.String lccStr
static final java.lang.String dbnameStr
static final java.lang.String drdaStr
static final int SINGLE_TRANSACTION_LOCK
static final int MULTI_TRANSACTION_LOCK
static final int UNKNOWN_CASING
static final int ANSI_CASING
static final int ANTI_ANSI_CASING
Method Detail |
---|
void initialize() throws StandardException
StandardException
- thrown if something goes wrongboolean getLogStatementText()
void setLogStatementText(boolean logStatementText)
logStatementText
- Whether or not logStatementText property is set.boolean getLogQueryPlan()
int getLockEscalationThreshold()
void addActivation(Activation a) throws StandardException
StandardException
void notifyUnusedActivation()
void removeActivation(Activation a) throws StandardException
StandardException
- thrown if something goes wrongint getActivationCount()
CursorActivation lookupCursorActivation(java.lang.String cursorName)
Activation getLastActivation()
java.lang.String getUniqueCursorName()
java.lang.String getUniqueSavepointName()
int getUniqueSavepointID()
boolean checkIfAnyDeclaredGlobalTempTablesForThisConnection()
void markTempTableAsModifiedInUnitOfWork(java.lang.String tableName)
tableName
- Mark the passed temporary table name as modifiedvoid addDeclaredGlobalTempTable(TableDescriptor td) throws StandardException
td
- Corresponding to the temporary table
StandardException
boolean dropDeclaredGlobalTempTable(java.lang.String tableName)
tableName
- look for this table name in the saved list and drop it if found
TempTableInfo
TableDescriptor getTableDescriptorForDeclaredGlobalTempTable(java.lang.String tableName)
tableName
- Get table descriptor for the passed table name
void resetFromPool() throws StandardException
StandardException
void internalCommit(boolean commitStore) throws StandardException
commitStore
- true if we should commit the Store transaction
StandardException
- thrown if something goes wrongvoid internalCommitNoSync(int commitflag) throws StandardException
commitflag
- the flags to pass to commitNoSync in the store's
TransactionController
StandardException
- thrown if something goes wrongvoid userCommit() throws StandardException
StandardException
- thrown if something goes wrongvoid xaCommit(boolean onePhase) throws StandardException
onePhase
- if true, allow it to commit without first going thru a
prepared state.
StandardException
- thrown if something goes wrongvoid internalRollback() throws StandardException
StandardException
- thrown if something goes wrongvoid userRollback() throws StandardException
StandardException
- thrown if something goes wrongvoid internalRollbackToSavepoint(java.lang.String savepointName, boolean refreshStyle, java.lang.Object kindOfSavepoint) throws StandardException
savepointName
- Name of the savepoint that needs to be rolled backrefreshStyle
- boolean indicating whether or not the controller should close
open conglomerates and scans. Also used to determine if language should close
open activations.kindOfSavepoint
- A NULL value means it is an internal savepoint (ie not a user defined savepoint)
Non NULL value means it is a user defined savepoint which can be a SQL savepoint or a JDBC savepoint
A String value for kindOfSavepoint would mean it is SQL savepoint
A JDBC Savepoint object value for kindOfSavepoint would mean it is JDBC savepoint
StandardException
- thrown if something goes wrongvoid releaseSavePoint(java.lang.String savepointName, java.lang.Object kindOfSavepoint) throws StandardException
savepointName
- Name of the savepoint that needs to be releasedkindOfSavepoint
- A NULL value means it is an internal savepoint (ie not a user defined savepoint)
Non NULL value means it is a user defined savepoint which can be a SQL savepoint or a JDBC savepoint
A String value for kindOfSavepoint would mean it is SQL savepoint
A JDBC Savepoint object value for kindOfSavepoint would mean it is JDBC savepoint
StandardException
- thrown if something goes wrongvoid xaRollback() throws StandardException
StandardException
- thrown if something goes wrongvoid languageSetSavePoint(java.lang.String savepointName, java.lang.Object kindOfSavepoint) throws StandardException
savepointName
- name of savepointkindOfSavepoint
- A NULL value means it is an internal savepoint (ie not a user defined savepoint)
Non NULL value means it is a user defined savepoint which can be a SQL savepoint or a JDBC savepoint
A String value for kindOfSavepoint would mean it is SQL savepoint
A JDBC Savepoint object value for kindOfSavepoint would mean it is JDBC savepoint
StandardException
- thrown if something goes wrongvoid beginNestedTransaction(boolean readOnly) throws StandardException
readOnly
- The nested transaction would be read only if param value true
StandardException
- on error.TransactionController.startNestedUserTransaction(boolean)
void commitNestedTransaction() throws StandardException
StandardException
- thrown on erroTransactionController.startNestedUserTransaction(boolean)
TransactionController getTransactionCompile()
TransactionController getTransactionExecute()
DataDictionary getDataDictionary()
DataValueFactory getDataValueFactory()
LanguageFactory getLanguageFactory()
OptimizerFactory getOptimizerFactory()
LanguageConnectionFactory getLanguageConnectionFactory()
java.lang.String getAuthorizationId()
SchemaDescriptor getDefaultSchema()
SchemaDescriptor getDefaultSchema(Activation a)
a
- current activation
void setDefaultSchema(SchemaDescriptor sd) throws StandardException
sd
- the new default schema.
If null, then the default schema descriptor is used.
StandardException
- thrown on failurevoid setDefaultSchema(Activation a, SchemaDescriptor sd) throws StandardException
a
- current activationsd
- the new default schema.
If null, then the default schema descriptor is used.
StandardException
- thrown on failurevoid resetSchemaUsages(Activation activation, java.lang.String schemaName) throws StandardException
activation
- current activationschemaName
- the schema name occurences of which is to be reset
StandardException
java.lang.String getCurrentSchemaName()
java.lang.String getCurrentSchemaName(Activation a)
boolean isInitialDefaultSchema(java.lang.String schemaName)
schemaName
-
java.lang.Long getIdentityValue()
void setIdentityValue(long val)
val
- the generated identity column valueboolean verifyNoOpenResultSets(PreparedStatement pStmt, Provider provider, int action) throws StandardException
pStmt
- The prepared Statementprovider
- The object precipitating a possible invalidationaction
- The action causing the possible invalidation
StandardException
- thrown on failureboolean verifyAllHeldResultSetsAreClosed() throws StandardException
StandardException
- thrown on failureCompilerContext pushCompilerContext()
StandardException
- thrown on failureCompilerContext pushCompilerContext(SchemaDescriptor sd)
sd
- the default schema
StandardException
- thrown on failurevoid popCompilerContext(CompilerContext compilerContext)
compilerContext
- The compiler context.
StandardException
- thrown on failureStatementContext pushStatementContext(boolean isAtomic, boolean isForReadOnly, java.lang.String stmtText, ParameterValueSet pvs, boolean rollbackParentContext, long timeoutMillis)
isAtomic
- whether a commit/rollback is permitted
from a nested connection under this statementstmtText
- the text of the statement. Needed for any language
statement (currently, for any statement that can cause a trigger
to fire). Please set this unless you are some funky jdbc setXXX
method or something.pvs
- parameter value set, if it has onerollbackParentContext
- True if 1) the statement context is
NOT a top-level context, AND 2) in the event of a statement-level
exception, the parent context needs to be rolled back, too.timeoutMillis
- Timeout value for this statement, in milliseconds.
Zero means no timeout.
void popStatementContext(StatementContext statementContext, java.lang.Throwable error)
statementContext
- The statement context.error
- The error, if any (Only relevant for DEBUG)void pushExecutionStmtValidator(ExecutionStmtValidator validator)
Multiple ExecutionStmtValidators may be active at any given time. This mirrors the way there can be multiple connection nestings at a single time. The validation is performed by calling each validator's validateStatement() method. This yields the union of all validations.
validator
- the validator to addvoid popExecutionStmtValidator(ExecutionStmtValidator validator) throws StandardException
validator
- the validator to remove
StandardException
- on errorvoid validateStmtExecution(ConstantAction constantAction) throws StandardException
constantAction
- the constantAction that is about to be executed (and
should be validated
StandardException
- on validation failurevoid pushTriggerExecutionContext(TriggerExecutionContext tec) throws StandardException
Multiple TriggerExecutionContexts may be active at any given time.
tec
- the trigger execution context
StandardException
- on trigger recursion errorvoid popTriggerExecutionContext(TriggerExecutionContext tec) throws StandardException
tec
- the tec to remove
StandardException
- on errorTriggerExecutionContext getTriggerExecutionContext()
void pushTriggerTable(TableDescriptor td)
td
- the table that the trigger is
defined uponvoid popTriggerTable(TableDescriptor td)
td
- the table to remove from the stack.TableDescriptor getTriggerTable()
int incrementBindCount()
int decrementBindCount()
int getBindCount()
void setDataDictionaryWriteMode()
boolean dataDictionaryInWriteMode()
void setRunTimeStatisticsMode(boolean onOrOff)
boolean getRunTimeStatisticsMode()
void setStatisticsTiming(boolean onOrOff)
boolean getStatisticsTiming()
void setRunTimeStatisticsObject(RunTimeStatistics runTimeStatisticsObject)
RunTimeStatistics getRunTimeStatisticsObject()
int getStatementDepth()
Database getDatabase()
boolean isIsolationLevelSetUsingSQLorJDBC()
void resetIsolationLevelFlagUsedForSQLandJDBC()
void setIsolationLevel(int isolationLevel) throws StandardException
isolationLevel
- The new isolationLevel.
StandardException
int getCurrentIsolationLevel()
java.lang.String getCurrentIsolationLevelStr()
void setPrepareIsolationLevel(int isolationLevel)
int getPrepareIsolationLevel()
void setReadOnly(boolean onOrOff) throws StandardException
onOrOff
- true sets the connection to be readOnly and
false sets it to readWrite.
StandardException
- The call failed and the readOnly
status has not changed.boolean isReadOnly()
Authorizer getAuthorizer()
StatementContext getStatementContext()
PreparedStatement prepareInternalStatement(SchemaDescriptor compilationSchema, java.lang.String sqlText, boolean isForReadOnly, boolean allowInternalSyntax) throws StandardException
compilationSchema
- schemasqlText
- sql query stringisForReadOnly
- read only status for resultset. Set to true if the concurrency mode for the resultset
is CONCUR_READ_ONLYallowInternalSyntax
- If true, then this query is allowed to use internal
sql syntax. One instance where this will be true is if a
metadata query is getting executed.
StandardException
PreparedStatement prepareInternalStatement(java.lang.String sqlText) throws StandardException
sqlText
- sql query string
StandardException
boolean setOptimizerTrace(boolean onOrOff)
onOrOff
- Whether to turn optimizer trace on (true) or off (false).
boolean getOptimizerTrace()
boolean setOptimizerTraceHtml(boolean onOrOff)
onOrOff
- Whether or not optimizer trace will be in html (true) or not (false).
boolean getOptimizerTraceHtml()
java.lang.String getOptimizerTraceOutput()
void setOptimizerTraceOutput(java.lang.String startingText)
void appendOptimizerTraceOutput(java.lang.String output)
boolean isTransactionPristine()
java.lang.Long lastAutoincrementValue(java.lang.String schemaName, java.lang.String tableName, java.lang.String columnName)
schemaName
- tableName
- columnName
- void setAutoincrementUpdate(boolean flag)
flag
- the value for autoincrementUpdate (TRUE or FALSE)AlterTableConstantAction.updateNewAutoincrementColumn(org.apache.derby.iapi.sql.Activation, java.lang.String, long, long)
boolean getAutoincrementUpdate()
void copyHashtableToAIHT(java.util.Map from)
long nextAutoincrementValue(java.lang.String schemaName, java.lang.String tableName, java.lang.String columnName) throws StandardException
schemaName
- tableName
- columnName
- identify the column uniquely in the system.
StandardException
- on error.void autoincrementFlushCache(UUID tableUUID) throws StandardException
tableUUID
- the table which is being flushed; we need this value to
identify the table for which the autoincrement counter is being
maintained.
StandardException
- thrown on error.lastAutoincrementValue(java.lang.String, java.lang.String, java.lang.String)
,
GenericLanguageConnectionContext.lastAutoincrementValue(java.lang.String, java.lang.String, java.lang.String)
,
ConnectionInfo.lastAutoincrementValue(java.lang.String, java.lang.String, java.lang.String)
void autoincrementCreateCounter(java.lang.String s, java.lang.String t, java.lang.String c, java.lang.Long initialValue, long increment, int position)
s
- SchemaNamet
- TableNamec
- ColumnNameinitialValue
- initial value of the counter.increment
- increment for the counter.position
- column position (1-based).int getInstanceNumber()
java.lang.String getDrdaID()
void setDrdaID(java.lang.String drdaID)
drdaID
- DRDA ID.java.lang.String getDbname()
boolean usesSqlAuthorization()
void closeUnusedActivations() throws StandardException
StandardException
void setCurrentRole(Activation a, java.lang.String role)
a
- activation of set role statementrole
- the id of the role to be set to currentjava.lang.String getCurrentRoleId(Activation a)
a
- activation of statement needing current role
java.lang.String getCurrentRoleIdDelimited(Activation a) throws StandardException
a
- activation of statement needing current role
StandardException
- standard exception policyboolean roleIsSettable(java.lang.String role) throws StandardException
role
- string containing role name
StandardException
- standard exception policyvoid setupNestedSessionContext(Activation a)
Called from generated code, see
StaticMethodCallNode#generateSetupNestedSessionContext
.
The new SQL session context is also set in the current statement context (of the invocation).
a
- activation of the statement which performs the call.StaticMethodCallNode.generateSetupNestedSessionContext(org.apache.derby.impl.sql.compile.ActivationClassBuilder, org.apache.derby.iapi.services.compiler.MethodBuilder)
,
StatementContext.getSQLSessionContext()
,
setupSubStatementSessionContext(org.apache.derby.iapi.sql.Activation)
SQLSessionContext getTopLevelSQLSessionContext()
void setupSubStatementSessionContext(Activation a)
ALTER TABLE
adding a column which has a default
values, the default value for all the existing rows is added
using an UPDATE
substatement.
ALTER TABLE
adding a a check constraint, we will use
a substatement SELECT
to check if all rows satisfy the
constraint.
ResultSet.insertRow
, updateRow
and deleteRow
.
setupNestedSessionContext(org.apache.derby.iapi.sql.Activation)
SQLSessionContext createSQLSessionContext()
void setLastQueryTree(java.lang.Object queryTree)
java.lang.Object getLastQueryTree()
java.util.Map getPrintedObjectsMap()
QueryTreeNode.treePrint(int)
void setXplainOnlyMode(boolean onOrOff)
onOrOff
- true if statements are to be XPLAINed only.boolean getXplainOnlyMode()
void setXplainSchema(java.lang.String schema)
schema
- the schema to use for storing XPLAIN'd statements
null means don't store the xplain information
non-null means persistent style, use the indicated schemajava.lang.String getXplainSchema()
void setXplainStatement(java.lang.Object key, java.lang.Object stmt)
java.lang.Object getXplainStatement(java.lang.Object key)
void setASTVisitor(ASTVisitor visitor)
visitor
- The Visitor which should walk the tree. Could be null.ASTVisitor getASTVisitor()
|
Built on Thu 2010-12-23 20:49:13+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |