|
|||||||||
| Home >> All >> org >> apache >> derby >> iapi >> sql >> [ conn overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.derby.iapi.sql.conn
Interface LanguageConnectionContext

- All Superinterfaces:
- org.apache.derby.iapi.services.context.Context
- public interface LanguageConnectionContext
- extends org.apache.derby.iapi.services.context.Context
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.
| 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(org.apache.derby.iapi.sql.Activation a)
Add the activation to those known about by this connection. |
void |
addDeclaredGlobalTempTable(org.apache.derby.iapi.sql.dictionary.TableDescriptor td)
Add the declared global temporary table to the list of temporary tables known by this connection. |
boolean |
anyoneBlocked()
Returns true if any transaction is blocked (even if not by this one) |
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(org.apache.derby.catalog.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 |
commitNestedTransaction()
commit a nested transaction. |
java.lang.String |
convertIdentifierCase(java.lang.String id)
Convert an identifier to the proper case for this connection. |
void |
copyHashtableToAIHT(java.util.Hashtable from)
copy a hashtable of autoincrement key value pairs into the cache of ai values stored in the language connection context. |
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. |
org.apache.derby.iapi.store.access.AccessFactory |
getAccessFactory()
Get the AccessFactory cached in this LanguageConnectionContext |
int |
getActivationCount()
Return the number of activation known for this connection. |
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 |
getCurrentSchemaName()
Get the current schema name |
org.apache.derby.iapi.db.Database |
getDatabase()
Returns the Database of this connection. |
org.apache.derby.iapi.sql.dictionary.DataDictionary |
getDataDictionary()
Get the data dictionary |
org.apache.derby.iapi.types.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. |
java.lang.String |
getDeclaredGlobalTemporaryTablesSchemaName()
Get the declared global temporary tables schema name. |
org.apache.derby.iapi.sql.dictionary.SchemaDescriptor |
getDefaultSchema()
Get the current default schema |
java.lang.String |
getDrdaID()
Get the DRDA ID of this LCC. |
org.apache.derby.iapi.sql.execute.ExecutionContext |
getExecutionContext()
Get the current ExecutionContext. |
int |
getIdentifierCasing()
Get casing for delimited identifiers. |
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. |
org.apache.derby.iapi.sql.LanguageFactory |
getLanguageFactory()
Get the language factory to use with this language connection context. |
org.apache.derby.iapi.sql.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 |
int |
getLockEscalationThreshold()
get the lock escalation threshold to use with this connection. |
java.lang.Object |
getLockObject(int lockScope)
Get the lock handle for the current transaction. |
boolean |
getLogQueryPlan()
Get value of logQueryPlan. |
boolean |
getLogStatementText()
Get value of logStatementText. |
org.apache.derby.iapi.sql.compile.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. |
boolean |
getRunTimeStatisticsMode()
Get the RUNTIMESTATISTICS mode. |
org.apache.derby.iapi.sql.execute.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. |
java.lang.String |
getSysIBMSchemaName()
Get the SYSIBM schema name. |
java.lang.String |
getSystemDiagSchemaName()
Get the SYSCS_DIAG schema name. |
java.lang.String |
getSystemSchemaName()
Get the system schema name. |
java.lang.String |
getSystemUtilSchemaName()
Get the SYSCS_UTIL schema name. |
org.apache.derby.iapi.sql.dictionary.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. |
org.apache.derby.iapi.store.access.TransactionController |
getTransactionCompile()
Get the transaction controller to use with this language connection context at compile time. |
org.apache.derby.iapi.store.access.TransactionController |
getTransactionExecute()
Get the transaction controller to use with this language connection context during execute time. |
org.apache.derby.iapi.db.TriggerExecutionContext |
getTriggerExecutionContext()
Get the topmost tec. |
org.apache.derby.iapi.sql.dictionary.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. |
int |
incrementBindCount()
Increment the DataDictionary bind count. |
void |
initialize(boolean sqlConnection)
Initialize. |
void |
internalCommit(boolean commitStore)
Do a commit, as internally needed by Cloudscape. |
void |
internalCommitNoSync(int commitflag)
Similar to internalCommit() but has logic for an unsynchronized commit |
void |
internalRollback()
Do a rollback, as internally needed by Cloudscape. |
void |
internalRollbackToSavepoint(java.lang.String savepointName,
boolean refreshStyle,
java.lang.Object kindOfSavepoint)
Let the context deal with a rollback to savepoint |
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. |
org.apache.derby.iapi.sql.execute.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 |
popCompilerContext(org.apache.derby.iapi.sql.compile.CompilerContext compilerContext)
Pop a CompilerContext off the context stack. |
void |
popExecutionStmtValidator(org.apache.derby.iapi.sql.execute.ExecutionStmtValidator validator)
Remove the validator. |
void |
popStatementContext(StatementContext statementContext,
java.lang.Throwable error)
Pop a StatementContext of the context stack. |
void |
popTriggerExecutionContext(org.apache.derby.iapi.db.TriggerExecutionContext tec)
Remove the tec. |
void |
popTriggerTable(org.apache.derby.iapi.sql.dictionary.TableDescriptor td)
Remove the trigger table descriptor. |
org.apache.derby.iapi.sql.PreparedStatement |
prepareInternalStatement(org.apache.derby.iapi.sql.dictionary.SchemaDescriptor compilationSchema,
java.lang.String sqlText)
|
org.apache.derby.iapi.sql.PreparedStatement |
prepareInternalStatement(java.lang.String sqlText)
Return a compiled Statement object. |
org.apache.derby.iapi.sql.compile.CompilerContext |
pushCompilerContext()
Push a CompilerContext on the context stack with the current default schema as the default schema which we compile against. |
org.apache.derby.iapi.sql.compile.CompilerContext |
pushCompilerContext(org.apache.derby.iapi.sql.dictionary.SchemaDescriptor sd)
Push a CompilerContext on the context stack with the passed in default schema as the default schema we compile against. |
void |
pushExecutionStmtValidator(org.apache.derby.iapi.sql.execute.ExecutionStmtValidator validator)
Push a new execution statement validator. |
StatementContext |
pushStatementContext(boolean isAtomic,
java.lang.String stmtText,
org.apache.derby.iapi.sql.ParameterValueSet pvs,
boolean rollbackParentContext)
Push a StatementContext on the context stack. |
void |
pushTriggerExecutionContext(org.apache.derby.iapi.db.TriggerExecutionContext tec)
Push a new trigger execution context. |
void |
pushTriggerTable(org.apache.derby.iapi.sql.dictionary.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(org.apache.derby.iapi.sql.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 |
setAutoincrementUpdate(boolean flag)
Sets autoincrementUpdate-- this variable allows updates to autoincrement columns if it is set to true. |
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(org.apache.derby.iapi.sql.dictionary.SchemaDescriptor sd)
Set the current default schema |
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 |
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(org.apache.derby.iapi.sql.execute.RunTimeStatistics runTimeStatisticsObject)
Set the RUNTIMESTATISTICS object. |
void |
setStatisticsTiming(boolean onOrOff)
Turn STATISTICS TIMING on or off. |
void |
setTransaction(org.apache.derby.iapi.store.access.TransactionController tran)
Sets the transaction controller to use with this language connection context. |
void |
userCommit()
Do a commit, as issued directly by a user (e.g. |
void |
userRollback()
Do a rollback, as issued directly by a user (e.g. |
void |
validateStmtExecution(org.apache.derby.iapi.sql.execute.ConstantAction constantAction)
Validate a statement. |
boolean |
verifyAllHeldResultSetsAreClosed()
Verify that there are no activations with open held result sets. |
boolean |
verifyNoOpenResultSets(org.apache.derby.iapi.sql.PreparedStatement pStmt,
org.apache.derby.iapi.sql.depend.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 |
CONTEXT_ID
public static final java.lang.String CONTEXT_ID
- this is the ID we expect these contexts
to be stored into a context manager under.
- See Also:
- Constant Field Values
OUTERMOST_STATEMENT
public static final int OUTERMOST_STATEMENT
- See Also:
- Constant Field Values
SQL92_SCHEMAS
public static final int SQL92_SCHEMAS
- See Also:
- Constant Field Values
USER_NAME_SCHEMA
public static final int USER_NAME_SCHEMA
- See Also:
- Constant Field Values
NO_SCHEMAS
public static final int NO_SCHEMAS
- See Also:
- Constant Field Values
xidStr
public static final java.lang.String xidStr
- See Also:
- Constant Field Values
lccStr
public static final java.lang.String lccStr
- See Also:
- Constant Field Values
dbnameStr
public static final java.lang.String dbnameStr
- See Also:
- Constant Field Values
drdaStr
public static final java.lang.String drdaStr
- See Also:
- Constant Field Values
SINGLE_TRANSACTION_LOCK
public static final int SINGLE_TRANSACTION_LOCK
- See Also:
- Constant Field Values
MULTI_TRANSACTION_LOCK
public static final int MULTI_TRANSACTION_LOCK
- See Also:
- Constant Field Values
UNKNOWN_CASING
public static final int UNKNOWN_CASING
- See Also:
- Constant Field Values
ANSI_CASING
public static final int ANSI_CASING
- See Also:
- Constant Field Values
ANTI_ANSI_CASING
public static final int ANTI_ANSI_CASING
- See Also:
- Constant Field Values
| Method Detail |
initialize
public void initialize(boolean sqlConnection)
throws org.apache.derby.iapi.error.StandardException
- Initialize. For use after pushing the contexts that initialization needs.
getLogStatementText
public boolean getLogStatementText()
- Get value of logStatementText.
(Whether or not to write info on currently
executing statement to error log.)
setLogStatementText
public void setLogStatementText(boolean logStatementText)
- Set value of logStatementText
(Whether or not to write info on currently
executing statement to error log.)
getLogQueryPlan
public boolean getLogQueryPlan()
- Get value of logQueryPlan.
(Whether or not to write query plan info on currently
executing statement to error log.)
getLockEscalationThreshold
public int getLockEscalationThreshold()
- get the lock escalation threshold to use with this connection.
addActivation
public void addActivation(org.apache.derby.iapi.sql.Activation a)
- Add the activation to those known about by this connection.
removeActivation
public void removeActivation(org.apache.derby.iapi.sql.Activation a) throws org.apache.derby.iapi.error.StandardException
- Remove the activation from those known about by this connection.
getActivationCount
public int getActivationCount()
- Return the number of activation known for this connection.
lookupCursorActivation
public org.apache.derby.iapi.sql.execute.CursorActivation lookupCursorActivation(java.lang.String cursorName)
- See if a given cursor is available for use. This is used
to locate the cursor during its execution.
getLastActivation
public org.apache.derby.iapi.sql.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
getUniqueCursorName
public java.lang.String getUniqueCursorName()
- Get a connection unique system generated name for a cursor.
getUniqueSavepointName
public java.lang.String getUniqueSavepointName()
- Get a connection unique system generated name for an unnamed savepoint.
getUniqueSavepointID
public int getUniqueSavepointID()
- Get a connection unique system generated id for an unnamed savepoint.
checkIfAnyDeclaredGlobalTempTablesForThisConnection
public boolean checkIfAnyDeclaredGlobalTempTablesForThisConnection()
- Check if there are any global temporary tables declared for this connection.
markTempTableAsModifiedInUnitOfWork
public void markTempTableAsModifiedInUnitOfWork(java.lang.String tableName)
- Mark the passed temporary table as modified in the current unit of work. That information will be used at rollback time
The compile phase will generate code to call this method if the DML is on a temporary table
addDeclaredGlobalTempTable
public void addDeclaredGlobalTempTable(org.apache.derby.iapi.sql.dictionary.TableDescriptor td) throws org.apache.derby.iapi.error.StandardException
- Add the declared global temporary table to the list of temporary tables known by this connection.
dropDeclaredGlobalTempTable
public 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.
getTableDescriptorForDeclaredGlobalTempTable
public org.apache.derby.iapi.sql.dictionary.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.
resetFromPool
public void resetFromPool()
throws org.apache.derby.iapi.error.StandardException
- Reset the connection before it is returned (indirectly) by
a PooledConnection object. See EmbeddedConnection.
internalCommit
public void internalCommit(boolean commitStore)
throws org.apache.derby.iapi.error.StandardException
- Do a commit, as internally needed by Cloudscape. E.g.
a commit for sync, or a commit for autocommit. Skips
checks that a user isn't doing something bad like issuing
a commit in a nested xact.
internalCommitNoSync
public void internalCommitNoSync(int commitflag)
throws org.apache.derby.iapi.error.StandardException
- Similar to internalCommit() but has logic for an unsynchronized commit
userCommit
public void userCommit()
throws org.apache.derby.iapi.error.StandardException
- Do a commit, as issued directly by a user (e.g. via Connection.commit()
or the JSQL 'COMMIT' statement.
xaCommit
public void xaCommit(boolean onePhase)
throws org.apache.derby.iapi.error.StandardException
- Commit a distrubuted transaction.
internalRollback
public void internalRollback()
throws org.apache.derby.iapi.error.StandardException
- Do a rollback, as internally needed by Cloudscape. E.g.
a rollback for sync, or a rollback for an internal error. Skips
checks that a user isn't doing something bad like issuing
a rollback in a nested xact.
userRollback
public void userRollback()
throws org.apache.derby.iapi.error.StandardException
- Do a rollback, as issued directly by a user (e.g. via Connection.rollback()
or the JSQL 'ROLLBACK' statement.
internalRollbackToSavepoint
public void internalRollbackToSavepoint(java.lang.String savepointName, boolean refreshStyle, java.lang.Object kindOfSavepoint) throws org.apache.derby.iapi.error.StandardException
- Let the context deal with a rollback to savepoint
releaseSavePoint
public void releaseSavePoint(java.lang.String savepointName, java.lang.Object kindOfSavepoint) throws org.apache.derby.iapi.error.StandardException
- Let the context deal with a release of a savepoint
xaRollback
public void xaRollback()
throws org.apache.derby.iapi.error.StandardException
- Roll back a distrubuted transaction.
languageSetSavePoint
public void languageSetSavePoint(java.lang.String savepointName, java.lang.Object kindOfSavepoint) throws org.apache.derby.iapi.error.StandardException
- Sets a savepoint. Causes the Store to set a savepoint.
anyoneBlocked
public boolean anyoneBlocked()
- Returns true if any transaction is blocked (even if not by this one)
setTransaction
public void setTransaction(org.apache.derby.iapi.store.access.TransactionController tran)
- Sets the transaction controller to use with this language connection
context.
beginNestedTransaction
public void beginNestedTransaction(boolean readOnly)
throws org.apache.derby.iapi.error.StandardException
- Begin a nested transaction.
commitNestedTransaction
public void commitNestedTransaction()
throws org.apache.derby.iapi.error.StandardException
- commit a nested transaction.
We do not provide a abortNestedTransaction.
If a nested xaction is aborted, then this results in the parent xaction
also being aborted. This is not what we need for releasing
compile time locks or autoincrement-- hence we do not provide
abortNestedTransaction.
getTransactionCompile
public org.apache.derby.iapi.store.access.TransactionController getTransactionCompile()
- Get the transaction controller to use with this language connection
context at compile time.
getTransactionExecute
public org.apache.derby.iapi.store.access.TransactionController getTransactionExecute()
- Get the transaction controller to use with this language connection
context during execute time.
getSystemSchemaName
public java.lang.String getSystemSchemaName() throws org.apache.derby.iapi.error.StandardException
- Get the system schema name.
getSysIBMSchemaName
public java.lang.String getSysIBMSchemaName() throws org.apache.derby.iapi.error.StandardException
- Get the SYSIBM schema name.
getSystemDiagSchemaName
public java.lang.String getSystemDiagSchemaName() throws org.apache.derby.iapi.error.StandardException
- Get the SYSCS_DIAG schema name.
getSystemUtilSchemaName
public java.lang.String getSystemUtilSchemaName() throws org.apache.derby.iapi.error.StandardException
- Get the SYSCS_UTIL schema name.
getDataDictionary
public org.apache.derby.iapi.sql.dictionary.DataDictionary getDataDictionary()
- Get the data dictionary
getDataValueFactory
public org.apache.derby.iapi.types.DataValueFactory getDataValueFactory()
- Get the data value factory to use with this language connection
context.
getLanguageFactory
public org.apache.derby.iapi.sql.LanguageFactory getLanguageFactory()
- Get the language factory to use with this language connection
context.
getOptimizerFactory
public org.apache.derby.iapi.sql.compile.OptimizerFactory getOptimizerFactory()
- get the optimizer factory to use with this language connection context.
getLanguageConnectionFactory
public LanguageConnectionFactory getLanguageConnectionFactory()
- Get the language connection factory to use with this language connection
context.
getAuthorizationId
public java.lang.String getAuthorizationId()
- Get the Authorization Id
getDeclaredGlobalTemporaryTablesSchemaName
public java.lang.String getDeclaredGlobalTemporaryTablesSchemaName() throws org.apache.derby.iapi.error.StandardException
- Get the declared global temporary tables schema name.
getDefaultSchema
public org.apache.derby.iapi.sql.dictionary.SchemaDescriptor getDefaultSchema()
- Get the current default schema
setDefaultSchema
public void setDefaultSchema(org.apache.derby.iapi.sql.dictionary.SchemaDescriptor sd) throws org.apache.derby.iapi.error.StandardException
- Set the current default schema
getCurrentSchemaName
public java.lang.String getCurrentSchemaName()
- Get the current schema name
getIdentityValue
public java.lang.Long getIdentityValue()
- Get the identity column value most recently generated.
setIdentityValue
public void setIdentityValue(long val)
- Set the field of most recently generated identity column value.
verifyNoOpenResultSets
public boolean verifyNoOpenResultSets(org.apache.derby.iapi.sql.PreparedStatement pStmt, org.apache.derby.iapi.sql.depend.Provider provider, int action) throws org.apache.derby.iapi.error.StandardException
- Verify that there are no activations with open result sets
on the specified prepared statement.
verifyAllHeldResultSetsAreClosed
public boolean verifyAllHeldResultSetsAreClosed()
throws org.apache.derby.iapi.error.StandardException
- Verify that there are no activations with open held result sets.
pushCompilerContext
public org.apache.derby.iapi.sql.compile.CompilerContext pushCompilerContext()
- Push a CompilerContext on the context stack with
the current default schema as the default schema
which we compile against.
pushCompilerContext
public org.apache.derby.iapi.sql.compile.CompilerContext pushCompilerContext(org.apache.derby.iapi.sql.dictionary.SchemaDescriptor sd)
- Push a CompilerContext on the context stack with
the passed in default schema as the default schema
we compile against.
popCompilerContext
public void popCompilerContext(org.apache.derby.iapi.sql.compile.CompilerContext compilerContext)
- Pop a CompilerContext off the context stack.
pushStatementContext
public StatementContext pushStatementContext(boolean isAtomic, java.lang.String stmtText, org.apache.derby.iapi.sql.ParameterValueSet pvs, boolean rollbackParentContext)
- Push a StatementContext on the context stack.
popStatementContext
public void popStatementContext(StatementContext statementContext, java.lang.Throwable error)
- Pop a StatementContext of the context stack.
pushExecutionStmtValidator
public void pushExecutionStmtValidator(org.apache.derby.iapi.sql.execute.ExecutionStmtValidator validator)
- Push a new execution statement validator. An execution statement
validator is an object that validates the current statement to
ensure that it is permitted given the current execution context.
An example of a validator a trigger ExecutionStmtValidator that
doesn't allow ddl on the trigger target table.
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.
popExecutionStmtValidator
public void popExecutionStmtValidator(org.apache.derby.iapi.sql.execute.ExecutionStmtValidator validator) throws org.apache.derby.iapi.error.StandardException
- Remove the validator. Does an object identity (validator == validator)
comparison. Asserts that the validator is found.
validateStmtExecution
public void validateStmtExecution(org.apache.derby.iapi.sql.execute.ConstantAction constantAction) throws org.apache.derby.iapi.error.StandardException
- Validate a statement. Does so by stepping through all the validators
and executing them. If a validator throws and exception, then the
checking is stopped and the exception is passed up.
pushTriggerExecutionContext
public void pushTriggerExecutionContext(org.apache.derby.iapi.db.TriggerExecutionContext tec) throws org.apache.derby.iapi.error.StandardException
- Push a new trigger execution context.
Multiple TriggerExecutionContexts may be active at any given time.
popTriggerExecutionContext
public void popTriggerExecutionContext(org.apache.derby.iapi.db.TriggerExecutionContext tec) throws org.apache.derby.iapi.error.StandardException
- Remove the tec. Does an object identity (tec == tec)
comparison. Asserts that the tec is found.
getTriggerExecutionContext
public org.apache.derby.iapi.db.TriggerExecutionContext getTriggerExecutionContext()
- Get the topmost tec.
pushTriggerTable
public void pushTriggerTable(org.apache.derby.iapi.sql.dictionary.TableDescriptor td)
- Set the trigger table descriptor. Used to compile
statements that may special trigger pseudo tables.
popTriggerTable
public void popTriggerTable(org.apache.derby.iapi.sql.dictionary.TableDescriptor td)
- Remove the trigger table descriptor.
getTriggerTable
public org.apache.derby.iapi.sql.dictionary.TableDescriptor getTriggerTable()
- Get the topmost trigger table descriptor
incrementBindCount
public int incrementBindCount()
- Increment the DataDictionary bind count. This is for keeping track
of nested binding, which can happen if SQL statements are bound from
within static initializers.
decrementBindCount
public int decrementBindCount()
- Decrement the DataDictionary bind count.
getBindCount
public int getBindCount()
- Get the DataDictionary bind count.
setDataDictionaryWriteMode
public 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.
dataDictionaryInWriteMode
public 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().
setRunTimeStatisticsMode
public void setRunTimeStatisticsMode(boolean onOrOff)
- Turn RUNTIMESTATISTICS on or off.
getRunTimeStatisticsMode
public boolean getRunTimeStatisticsMode()
- Get the RUNTIMESTATISTICS mode.
setStatisticsTiming
public void setStatisticsTiming(boolean onOrOff)
- Turn STATISTICS TIMING on or off.
getStatisticsTiming
public boolean getStatisticsTiming()
- Get the STATISTICS TIMING mode.
setRunTimeStatisticsObject
public void setRunTimeStatisticsObject(org.apache.derby.iapi.sql.execute.RunTimeStatistics runTimeStatisticsObject)
- Set the RUNTIMESTATISTICS object.
getRunTimeStatisticsObject
public org.apache.derby.iapi.sql.execute.RunTimeStatistics getRunTimeStatisticsObject()
- Get the RUNTIMESTATISTICS object.
getStatementDepth
public int getStatementDepth()
- Reports how many statement levels deep we are.
getDatabase
public org.apache.derby.iapi.db.Database getDatabase()
- Returns the Database of this connection.
setIsolationLevel
public void setIsolationLevel(int isolationLevel)
throws org.apache.derby.iapi.error.StandardException
- Set current isolation level.
getCurrentIsolationLevel
public int getCurrentIsolationLevel()
- Get the current isolation level.
getCurrentIsolationLevelStr
public java.lang.String getCurrentIsolationLevelStr()
- Get the current isolation level in DB2 format.
setPrepareIsolationLevel
public void setPrepareIsolationLevel(int isolationLevel)
getPrepareIsolationLevel
public int getPrepareIsolationLevel()
- Get the prepare isolation level.
If the isolation level has been explicitly set with a SQL statement or
embedded call to setTransactionIsolation, this will return
ExecutionContext.UNSPECIFIED_ISOLATION_LEVEL
SET ISOLATION always takes priority.
setReadOnly
public void setReadOnly(boolean onOrOff)
throws org.apache.derby.iapi.error.StandardException
- Set the readOnly status for the current connection. This can
only be called when the current transaction has not done
any work.
isReadOnly
public boolean isReadOnly()
- Get the readOnly status for the current connection.
getAuthorizer
public Authorizer getAuthorizer()
- Get an Authorizer for this connection.
getExecutionContext
public org.apache.derby.iapi.sql.execute.ExecutionContext getExecutionContext()
- Get the current ExecutionContext.
getStatementContext
public StatementContext getStatementContext()
- Get the current StatementContext.
getAccessFactory
public org.apache.derby.iapi.store.access.AccessFactory getAccessFactory()
- Get the AccessFactory cached in this LanguageConnectionContext
prepareInternalStatement
public org.apache.derby.iapi.sql.PreparedStatement prepareInternalStatement(java.lang.String sqlText) throws org.apache.derby.iapi.error.StandardException
- Return a compiled Statement object. The schema and unicode
setting fo the returned statement are that of this connection.
prepareInternalStatement
public org.apache.derby.iapi.sql.PreparedStatement prepareInternalStatement(org.apache.derby.iapi.sql.dictionary.SchemaDescriptor compilationSchema, java.lang.String sqlText) throws org.apache.derby.iapi.error.StandardException
setOptimizerTrace
public boolean setOptimizerTrace(boolean onOrOff)
- Control whether or not optimizer trace is on.
getOptimizerTrace
public boolean getOptimizerTrace()
- Get whether or not optimizer trace is on.
setOptimizerTraceHtml
public boolean setOptimizerTraceHtml(boolean onOrOff)
- Control whether or not optimizer trace is generated in html.
getOptimizerTraceHtml
public boolean getOptimizerTraceHtml()
- Get whether or not optimizer trace html is on.
getOptimizerTraceOutput
public java.lang.String getOptimizerTraceOutput()
- Get the optimizer trace output for the last optimized query as a String. If optimizer trace
html is on, then the String will contain the html tags.
setOptimizerTraceOutput
public void setOptimizerTraceOutput(java.lang.String startingText)
- Set the optimizer trace output to the specified String.
(Done at the beginning of each statement.)
appendOptimizerTraceOutput
public void appendOptimizerTraceOutput(java.lang.String output)
- Append the latest output to the optimizer trace output.
isTransactionPristine
public boolean isTransactionPristine()
- Reports whether there is any outstanding work in the transaction.
getLockObject
public java.lang.Object getLockObject(int lockScope) throws org.apache.derby.iapi.error.StandardException
- Get the lock handle for the current transaction.
getIdentifierCasing
public int getIdentifierCasing()
throws org.apache.derby.iapi.error.StandardException
- Get casing for delimited identifiers. This feature is here to
support the Plugin.
convertIdentifierCase
public java.lang.String convertIdentifierCase(java.lang.String id) throws org.apache.derby.iapi.error.StandardException
- Convert an identifier to the proper case for this connection. This method
is here to support the Plugin.
lastAutoincrementValue
public 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.
If no values have been inserted into the given column a NULL value
is returned.
setAutoincrementUpdate
public void setAutoincrementUpdate(boolean flag)
- Sets autoincrementUpdate-- this variable allows updates to autoincrement
columns if it is set to true. The default is ofcourse false; i.e
ai columns cannot be directly modified by the user. This is set to
true by AlterTableConstantAction, when a new ai column is being added
to an existing table.
getAutoincrementUpdate
public boolean getAutoincrementUpdate()
- Returns the current value of autoincrementUpdate.
copyHashtableToAIHT
public void copyHashtableToAIHT(java.util.Hashtable from)
- copy a hashtable of autoincrement key value pairs into the cache of
ai values stored in the language connection context.
nextAutoincrementValue
public long nextAutoincrementValue(java.lang.String schemaName, java.lang.String tableName, java.lang.String columnName) throws org.apache.derby.iapi.error.StandardException
- returns the next value to be inserted into an autoincrement col.
This is used internally by the system to generate autoincrement values
which are going to be inserted into a autoincrement column. This is
used when as autoincrement column is added to a table by an alter
table statemenet and during bulk insert.
autoincrementFlushCache
public void autoincrementFlushCache(org.apache.derby.catalog.UUID tableUUID) throws org.apache.derby.iapi.error.StandardException
- Flush the cache of autoincrement values being kept by the lcc.
This will result in the autoincrement values being written to the
SYSCOLUMNS table as well as the mapping used by lastAutoincrementValue
autoincrementCreateCounter
public 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. The counter is identified by (schemaName, tableName,
columnName). The counter must be freed up by calling
autoincrementFlushCache at the end of the statement. It is expected
that a ai-counter with the same signaure doesn't exist when the
method is called.
getInstanceNumber
public int getInstanceNumber()
- Get the instance number of this LCC.
getDrdaID
public java.lang.String getDrdaID()
- Get the DRDA ID of this LCC.
setDrdaID
public void setDrdaID(java.lang.String drdaID)
- Set the DRDA ID of this LCC.
getDbname
public java.lang.String getDbname()
- Get the database name of this LCC.
| ||||||||
JAVADOC