|
|||||||||
| Home >> All >> org >> apache >> derby >> impl >> [ sql overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.derby.impl.sql
Class GenericActivationHolder

java.lang.Objectorg.apache.derby.impl.sql.GenericActivationHolder
- All Implemented Interfaces:
- org.apache.derby.iapi.sql.Activation
- final class GenericActivationHolder
- extends java.lang.Object
- implements org.apache.derby.iapi.sql.Activation
- extends java.lang.Object
This class holds an Activation, and passes through most of the calls to the activation. The purpose of this class is to allow a PreparedStatement to be recompiled without the caller having to detect this and get a new activation. In addition to the Activation, this class holds a reference to the PreparedStatement that created it, along with a reference to the GeneratedClass that was associated with the PreparedStatement at the time this holder was created. These references are used to validate the Activation, to ensure that an activation is used only with the PreparedStatement that created it, and to detect when recompilation has happened. We detect recompilation by checking whether the GeneratedClass has changed. If it has, we try to let the caller continue to use this ActivationHolder. We create a new instance of the new GeneratedClass (that is, we create a new Activation), and we compare the number and type of parameters. If these are compatible, we copy the parameters from the old to the new Activation. If they are not compatible, we throw an exception telling the user that the Activation is out of date, and they need to get a new one.
| Field Summary | |
(package private) org.apache.derby.impl.sql.execute.BaseActivation |
ac
|
(package private) org.apache.derby.iapi.services.loader.GeneratedClass |
gc
|
private org.apache.derby.iapi.sql.conn.LanguageConnectionContext |
lcc
|
(package private) org.apache.derby.iapi.types.DataTypeDescriptor[] |
paramTypes
|
(package private) org.apache.derby.iapi.sql.execute.ExecPreparedStatement |
ps
|
| Constructor Summary | |
(package private) |
GenericActivationHolder(org.apache.derby.iapi.sql.conn.LanguageConnectionContext lcc,
org.apache.derby.iapi.services.loader.GeneratedClass gc,
org.apache.derby.iapi.sql.execute.ExecPreparedStatement ps,
boolean scrollable)
Constructor for an ActivationHolder |
| Method Summary | |
void |
addWarning(java.sql.SQLWarning w)
Add a warning to the activation |
boolean |
checkIfThisActivationHasHoldCursor(java.lang.String tableName)
Temporary tables can be declared with ON COMMIT DELETE ROWS. |
void |
checkStatementValidity()
Check the validity of the current executing statement. |
void |
clearCurrentRow(int resultSetNumber)
Generated plans have a current row field for ease in defining the methods and finding them dynamically. |
void |
clearHeapConglomerateController()
Clear the ConglomerateController to be used for an update or delete. |
void |
clearIndexScanInfo()
Clear the info for the index to be re-used for update/delete. |
void |
clearParentResultSets()
|
void |
clearResultSet()
Sets the ResultSet to be returned by getResultSet() to null. |
void |
clearWarnings()
Clear the activation's warnings. |
void |
close()
Closing an activation statement marks it as unusable. |
org.apache.derby.iapi.sql.ResultSet |
execute()
When the prepared statement is executed, it passes execution on to the activation execution was requested for. |
int[] |
getAutoGeneratedKeysColumnIndexes()
Returns the column positions array of columns requested in auto-generated keys resultset for this avtivation. |
java.lang.String[] |
getAutoGeneratedKeysColumnNames()
Returns the column names array of columns requested in auto-generated keys resultset for this avtivation. |
boolean |
getAutoGeneratedKeysResultsetMode()
Returns true if auto-generated keys resultset request was made for this avtivation. |
org.apache.derby.iapi.sql.execute.ConstantAction |
getConstantAction()
|
java.lang.String |
getCursorName()
Return the cursor name of this activation. |
org.apache.derby.iapi.types.DataValueFactory |
getDataValueFactory()
Get the DataValueFactory |
org.apache.derby.iapi.sql.dictionary.TableDescriptor |
getDDLTableDescriptor()
Get the TableDescriptor for the target of DDL. |
java.sql.ResultSet[][] |
getDynamicResults()
Return the set of dynamical created result sets, for procedures. |
org.apache.derby.iapi.sql.execute.ExecutionFactory |
getExecutionFactory()
Get the ExecutionFactory |
boolean |
getForCreateTable()
Get whether or not this activation is for create table. |
org.apache.derby.iapi.sql.execute.CursorResultSet |
getForUpdateIndexScan()
|
org.apache.derby.iapi.store.access.ConglomerateController |
getHeapConglomerateController()
Get the ConglomerateController, if any, that has already been opened for the heap when scaning for an update or delete. |
long |
getIndexConglomerateNumber()
Get the conglomerate number of the index, if any, that has already been opened for scaning for an update or delete. |
org.apache.derby.iapi.store.access.ScanController |
getIndexScanController()
Get the ScanController, if any, that has already been opened for the index when scaning for an update or delete. |
org.apache.derby.iapi.sql.conn.LanguageConnectionContext |
getLanguageConnectionContext()
Get the language connection context associated with this activation |
int |
getMaxDynamicResults()
Return the maximum number of dynamical created result sets from the procedure definition. |
int |
getMaxRows()
Get the maximum # of rows. |
int |
getNumSubqueries()
Get the number of subqueries in the entire query. |
org.apache.derby.iapi.sql.ParameterValueSet |
getParameterValueSet()
Gets the ParameterValueSet for this execution of the statement. |
java.util.Vector |
getParentResultSet(java.lang.String resultSetId)
get the reference to parent table ResultSets, that will be needed by the referential action dependent table scans. |
java.util.Hashtable |
getParentResultSets()
|
org.apache.derby.iapi.sql.execute.ExecPreparedStatement |
getPreparedStatement()
Get the prepared statement that this activation is for. |
org.apache.derby.iapi.sql.ResultDescription |
getResultDescription()
Get the result description for this activation, if it has one. |
org.apache.derby.iapi.sql.ResultSet |
getResultSet()
Returns the current result set for this activation, i.e. |
boolean |
getResultSetHoldability()
Return the holdability of this activation. |
org.apache.derby.iapi.types.RowLocation |
getRowLocationTemplate(int itemNumber)
Get the saved RowLocation. |
java.sql.ResultSet |
getTargetVTI()
Get the ResultSet for the target of an update/delete to a VTI. |
org.apache.derby.iapi.store.access.TransactionController |
getTransactionController()
Get the Execution TransactionController associated with this activation/lcc. |
java.sql.SQLWarning |
getWarnings()
Returns the chained list of warnings. |
void |
informOfRowCount(org.apache.derby.iapi.sql.execute.NoPutResultSet resultSet,
long rowCount)
Tell this activation that the given ResultSet was found to have the given number of rows. |
boolean |
isClosed()
Find out if the activation is closed or not. |
boolean |
isCursorActivation()
Is this Activation for a cursor? |
boolean |
isInUse()
Is the activation in use? |
boolean |
isSingleExecution()
Is the activation set up for a single execution. |
void |
markUnused()
Mark the activation as unused. |
void |
reset()
Resets the activation to the "pre-execution" state - that is, the state where it can be used to begin a new execution. |
void |
setAutoGeneratedKeysResultsetInfo(int[] columnIndexes,
java.lang.String[] columnNames)
Set the auto-generated keys resultset mode to true for this activation. |
void |
setCurrentRow(org.apache.derby.iapi.sql.execute.ExecRow currentRow,
int resultSetNumber)
Generated plans have a current row field for ease in defining the methods and finding them dynamically. |
void |
setCursorName(java.lang.String cursorName)
JDBC requires that all select statements be converted into cursors, and that the cursor name be settable for each execution of a select statement. |
void |
setDDLTableDescriptor(org.apache.derby.iapi.sql.dictionary.TableDescriptor td)
Save the TableDescriptor for the target of DDL so that it can be passed between the various ConstantActions during execution. |
void |
setForCreateTable()
Mark the Activation as being for create table. |
void |
setForUpdateIndexScan(org.apache.derby.iapi.sql.execute.CursorResultSet forUpdateResultSet)
beetle 3865: updateable cursor using index. |
void |
setHeapConglomerateController(org.apache.derby.iapi.store.access.ConglomerateController updateHeapCC)
Set the ConglomerateController to be used for an update or delete. |
void |
setIndexConglomerateNumber(long indexConglomerateNumber)
Set the conglomerate number of the index to be used for an update or delete, when scanning an index that will also be updated (Saves opening the ScanController twice.) |
void |
setIndexScanController(org.apache.derby.iapi.store.access.ScanController indexSC)
Set the ScanController to be used for an update or delete, when scanning an index that will also be updated (Saves opening the ScanController twice.) |
void |
setMaxRows(int maxRows)
Set the maximum # of rows. |
void |
setParameters(org.apache.derby.iapi.sql.ParameterValueSet parameterValues,
org.apache.derby.iapi.types.DataTypeDescriptor[] parameterTypes)
Sets the parameter values for this execution of the statement. |
void |
setParentResultSet(org.apache.derby.iapi.sql.execute.TemporaryRowHolder rs,
java.lang.String resultSetId)
|
void |
setResultSetHoldability(boolean resultSetHoldability)
Set current resultset holdability. |
void |
setSingleExecution()
Set the activation for a single execution. |
void |
setTargetVTI(java.sql.ResultSet targetVTI)
Save the ResultSet for the target of an update/delete to a VTI. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
ac
org.apache.derby.impl.sql.execute.BaseActivation ac
ps
org.apache.derby.iapi.sql.execute.ExecPreparedStatement ps
gc
org.apache.derby.iapi.services.loader.GeneratedClass gc
paramTypes
org.apache.derby.iapi.types.DataTypeDescriptor[] paramTypes
lcc
private final org.apache.derby.iapi.sql.conn.LanguageConnectionContext lcc
| Constructor Detail |
GenericActivationHolder
GenericActivationHolder(org.apache.derby.iapi.sql.conn.LanguageConnectionContext lcc, org.apache.derby.iapi.services.loader.GeneratedClass gc, org.apache.derby.iapi.sql.execute.ExecPreparedStatement ps, boolean scrollable) throws org.apache.derby.iapi.error.StandardException
- Constructor for an ActivationHolder
| Method Detail |
reset
public void reset()
throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Resets the activation to the "pre-execution" state -
that is, the state where it can be used to begin a new execution.
Frees local buffers, stops scans, resets counters to zero, sets
current date and time to an unitialized state, etc.
- Specified by:
resetin interfaceorg.apache.derby.iapi.sql.Activation
checkIfThisActivationHasHoldCursor
public boolean checkIfThisActivationHasHoldCursor(java.lang.String tableName)
- Temporary tables can be declared with ON COMMIT DELETE ROWS. But if the table has a held curosr open at
commit time, data should not be deleted from the table. This method, (gets called at commit time) checks if this
activation held cursor and if so, does that cursor reference the passed temp table name.
- Specified by:
checkIfThisActivationHasHoldCursorin interfaceorg.apache.derby.iapi.sql.Activation
setCursorName
public void setCursorName(java.lang.String cursorName)
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - JDBC requires that all select statements be converted into cursors,
and that the cursor name be settable for each execution of a select
statement. The Language Module will support this, so that the JDBC
driver will not have to parse JSQL text. This method will have no
effect when called on non-select statements.
There will be a JSQL statement to disable the "cursorization" of all select statements. For non-cursorized select statements, this method will have no effect.
This has no effect if the activation has been closed.
- Specified by:
setCursorNamein interfaceorg.apache.derby.iapi.sql.Activation
getCursorName
public java.lang.String getCursorName()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Return the cursor name of this activation. This will differ
from its ResultSet's cursor name if it has been
altered with setCursorName. Thus this always returns the cursor
name of the next execution of this activation. The cursor name
of the current execution must be obtained from the ResultSet.
or this.getResultSet.getCursorName() [with null checking].
Statements that do not support cursors will return a null.
- Specified by:
getCursorNamein interfaceorg.apache.derby.iapi.sql.Activation
setResultSetHoldability
public void setResultSetHoldability(boolean resultSetHoldability)
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Set current resultset holdability.
- Specified by:
setResultSetHoldabilityin interfaceorg.apache.derby.iapi.sql.Activation
getResultSetHoldability
public boolean getResultSetHoldability()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Return the holdability of this activation.
- Specified by:
getResultSetHoldabilityin interfaceorg.apache.derby.iapi.sql.Activation
setAutoGeneratedKeysResultsetInfo
public void setAutoGeneratedKeysResultsetInfo(int[] columnIndexes,
java.lang.String[] columnNames)
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Set the auto-generated keys resultset mode to true for this activation.
The specific columns for auto-generated keys resultset can be requested by
passing column positions array
The specific columns for auto-generated keys resultset can be requested by
passing column names array
Both the parameters would be null if user didn't request specific keys.
Otherwise, the user could request specific columns by passing column positions
or names array but not both.
- Specified by:
setAutoGeneratedKeysResultsetInfoin interfaceorg.apache.derby.iapi.sql.Activation
getAutoGeneratedKeysResultsetMode
public boolean getAutoGeneratedKeysResultsetMode()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Returns true if auto-generated keys resultset request was made for this
avtivation.
- Specified by:
getAutoGeneratedKeysResultsetModein interfaceorg.apache.derby.iapi.sql.Activation
getAutoGeneratedKeysColumnIndexes
public int[] getAutoGeneratedKeysColumnIndexes()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Returns the column positions array of columns requested in auto-generated
keys resultset for this avtivation. Returns null if no specific column
requested by positions
- Specified by:
getAutoGeneratedKeysColumnIndexesin interfaceorg.apache.derby.iapi.sql.Activation
getAutoGeneratedKeysColumnNames
public java.lang.String[] getAutoGeneratedKeysColumnNames()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Returns the column names array of columns requested in auto-generated
keys resultset for this avtivation. Returns null if no specific column
requested by names
- Specified by:
getAutoGeneratedKeysColumnNamesin interfaceorg.apache.derby.iapi.sql.Activation
getLanguageConnectionContext
public org.apache.derby.iapi.sql.conn.LanguageConnectionContext getLanguageConnectionContext()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Get the language connection context associated with this activation
- Specified by:
getLanguageConnectionContextin interfaceorg.apache.derby.iapi.sql.Activation
getTransactionController
public org.apache.derby.iapi.store.access.TransactionController getTransactionController()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Get the Execution TransactionController associated with this
activation/lcc.
- Specified by:
getTransactionControllerin interfaceorg.apache.derby.iapi.sql.Activation
getExecutionFactory
public org.apache.derby.iapi.sql.execute.ExecutionFactory getExecutionFactory()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Get the ExecutionFactory
- Specified by:
getExecutionFactoryin interfaceorg.apache.derby.iapi.sql.Activation
getParameterValueSet
public org.apache.derby.iapi.sql.ParameterValueSet getParameterValueSet()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Gets the ParameterValueSet for this execution of the statement.
- Specified by:
getParameterValueSetin interfaceorg.apache.derby.iapi.sql.Activation
setParameters
public void setParameters(org.apache.derby.iapi.sql.ParameterValueSet parameterValues, org.apache.derby.iapi.types.DataTypeDescriptor[] parameterTypes) throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Sets the parameter values for this execution of the statement.
Has no effect if the activation has been closed.
NOTE: The setParameters() method is currently unimplemented. A statement with parameters will generate its own ParameterValueSet, which can be gotten with the getParameterValueSet() method (above). The idea behind setParameters() is to improve performance when operating across a network by allowing all the parameters to be set in one call, as opposed to one call per parameter.
- Specified by:
setParametersin interfaceorg.apache.derby.iapi.sql.Activation
execute
public org.apache.derby.iapi.sql.ResultSet execute() throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - When the prepared statement is executed, it passes
execution on to the activation execution was requested for.
- Specified by:
executein interfaceorg.apache.derby.iapi.sql.Activation
getResultSet
public org.apache.derby.iapi.sql.ResultSet getResultSet()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Returns the current result set for this activation, i.e.
the one returned by the last execute() call. If there has
been no execute call or the activation has been reset or closed,
a null is returned.
- Specified by:
getResultSetin interfaceorg.apache.derby.iapi.sql.Activation
clearResultSet
public void clearResultSet()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Sets the ResultSet to be returned by getResultSet() to null.
- Specified by:
clearResultSetin interfaceorg.apache.derby.iapi.sql.Activation
setCurrentRow
public void setCurrentRow(org.apache.derby.iapi.sql.execute.ExecRow currentRow, int resultSetNumber)
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Generated plans have a current row field for ease in defining
the methods and finding them dynamically. The interface is
used to set the row before a dynamic method that uses it is
invoked.
When all processing on the currentRow has been completed, callers should call activation.clearCurrentRow(resultSetNumber) to ensure that no unnecessary references are retained to rows. This will allow the rows no longer in use to be collected by the garbage collecter.
- Specified by:
setCurrentRowin interfaceorg.apache.derby.iapi.sql.Activation
clearCurrentRow
public void clearCurrentRow(int resultSetNumber)
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Generated plans have a current row field for ease in defining
the methods and finding them dynamically. The interface is
used to set the row before a dynamic method that uses it is
invoked.
When all processing on the currentRow has been completed, callers should call activation.clearCurrentRow(resultSetNumber) to ensure that no unnecessary references are retained to rows. This will allow the rows no longer in use to be collected by the garbage collecter.
- Specified by:
clearCurrentRowin interfaceorg.apache.derby.iapi.sql.Activation
getPreparedStatement
public org.apache.derby.iapi.sql.execute.ExecPreparedStatement getPreparedStatement()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Get the prepared statement that this activation is for.
- Specified by:
getPreparedStatementin interfaceorg.apache.derby.iapi.sql.Activation
checkStatementValidity
public void checkStatementValidity()
throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Check the validity of the current executing statement. Needs to be
called after a statement has obtained the relevant table locks on
the
- Specified by:
checkStatementValidityin interfaceorg.apache.derby.iapi.sql.Activation
getResultDescription
public org.apache.derby.iapi.sql.ResultDescription getResultDescription()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Get the result description for this activation, if it has one.
- Specified by:
getResultDescriptionin interfaceorg.apache.derby.iapi.sql.Activation
getDataValueFactory
public org.apache.derby.iapi.types.DataValueFactory getDataValueFactory()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Get the DataValueFactory
- Specified by:
getDataValueFactoryin interfaceorg.apache.derby.iapi.sql.Activation
getRowLocationTemplate
public org.apache.derby.iapi.types.RowLocation getRowLocationTemplate(int itemNumber)
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Get the saved RowLocation.
- Specified by:
getRowLocationTemplatein interfaceorg.apache.derby.iapi.sql.Activation
getHeapConglomerateController
public org.apache.derby.iapi.store.access.ConglomerateController getHeapConglomerateController()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Get the ConglomerateController, if any, that has already
been opened for the heap when scaning for an update or delete.
(Saves opening the ConglomerateController twice.)
- Specified by:
getHeapConglomerateControllerin interfaceorg.apache.derby.iapi.sql.Activation
setHeapConglomerateController
public void setHeapConglomerateController(org.apache.derby.iapi.store.access.ConglomerateController updateHeapCC)
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Set the ConglomerateController to be used for an update or delete.
(Saves opening the ConglomerateController twice.)
- Specified by:
setHeapConglomerateControllerin interfaceorg.apache.derby.iapi.sql.Activation
clearHeapConglomerateController
public void clearHeapConglomerateController()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Clear the ConglomerateController to be used for an update or delete.
(Saves opening the ConglomerateController twice.)
- Specified by:
clearHeapConglomerateControllerin interfaceorg.apache.derby.iapi.sql.Activation
getIndexScanController
public org.apache.derby.iapi.store.access.ScanController getIndexScanController()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Get the ScanController, if any, that has already
been opened for the index when scaning for an update or delete.
(Saves opening the ScanController twice.)
- Specified by:
getIndexScanControllerin interfaceorg.apache.derby.iapi.sql.Activation
setIndexScanController
public void setIndexScanController(org.apache.derby.iapi.store.access.ScanController indexSC)
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Set the ScanController to be used for an update or delete,
when scanning an index that will also be updated
(Saves opening the ScanController twice.)
- Specified by:
setIndexScanControllerin interfaceorg.apache.derby.iapi.sql.Activation
getIndexConglomerateNumber
public long getIndexConglomerateNumber()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Get the conglomerate number of the index, if any, that has already
been opened for scaning for an update or delete.
(Saves opening the ScanController twice.)
- Specified by:
getIndexConglomerateNumberin interfaceorg.apache.derby.iapi.sql.Activation
setIndexConglomerateNumber
public void setIndexConglomerateNumber(long indexConglomerateNumber)
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Set the conglomerate number of the index to be used for an update or delete,
when scanning an index that will also be updated
(Saves opening the ScanController twice.)
- Specified by:
setIndexConglomerateNumberin interfaceorg.apache.derby.iapi.sql.Activation
clearIndexScanInfo
public void clearIndexScanInfo()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Clear the info for the index to be re-used for update/delete.
(ScanController and conglomerate number.)
- Specified by:
clearIndexScanInfoin interfaceorg.apache.derby.iapi.sql.Activation
close
public void close()
throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Closing an activation statement marks it as unusable. Any other
requests made on it will fail. An activation should be
marked closed when it is expected to not be used any longer,
i.e. when the connection for it is closed, or it has suffered some
sort of severe error. This will also close its result set and
release any resources it holds e.g. for parameters.
Any class that implements this must be prepared to be executed from garbage collection, ie. there is no matching context stack.
- Specified by:
closein interfaceorg.apache.derby.iapi.sql.Activation
isClosed
public boolean isClosed()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Find out if the activation is closed or not.
- Specified by:
isClosedin interfaceorg.apache.derby.iapi.sql.Activation
setSingleExecution
public void setSingleExecution()
- Set the activation for a single execution.
- Specified by:
setSingleExecutionin interfaceorg.apache.derby.iapi.sql.Activation
isSingleExecution
public boolean isSingleExecution()
- Is the activation set up for a single execution.
- Specified by:
isSingleExecutionin interfaceorg.apache.derby.iapi.sql.Activation
getNumSubqueries
public int getNumSubqueries()
- Get the number of subqueries in the entire query.
- Specified by:
getNumSubqueriesin interfaceorg.apache.derby.iapi.sql.Activation
setForCreateTable
public void setForCreateTable()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Mark the Activation as being for create table.
(NOTE: We can do certain optimizations for
create table that we can't do for other DDL.)
- Specified by:
setForCreateTablein interfaceorg.apache.derby.iapi.sql.Activation
getForCreateTable
public boolean getForCreateTable()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Get whether or not this activation is for
create table.
(NOTE: We can do certain optimizations for
create table that we can't do for other DDL.)
- Specified by:
getForCreateTablein interfaceorg.apache.derby.iapi.sql.Activation
setDDLTableDescriptor
public void setDDLTableDescriptor(org.apache.derby.iapi.sql.dictionary.TableDescriptor td)
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Save the TableDescriptor for the target of
DDL so that it can be passed between the
various ConstantActions during execution.
- Specified by:
setDDLTableDescriptorin interfaceorg.apache.derby.iapi.sql.Activation
getDDLTableDescriptor
public org.apache.derby.iapi.sql.dictionary.TableDescriptor getDDLTableDescriptor()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Get the TableDescriptor for the target of
DDL.
- Specified by:
getDDLTableDescriptorin interfaceorg.apache.derby.iapi.sql.Activation
setMaxRows
public void setMaxRows(int maxRows)
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Set the maximum # of rows. (# of rows that can
be returned by a ResultSet. 0 means no limit.)
- Specified by:
setMaxRowsin interfaceorg.apache.derby.iapi.sql.Activation
getMaxRows
public int getMaxRows()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Get the maximum # of rows. (# of rows that can
be returned by a ResultSet. 0 means no limit.)
- Specified by:
getMaxRowsin interfaceorg.apache.derby.iapi.sql.Activation
setTargetVTI
public void setTargetVTI(java.sql.ResultSet targetVTI)
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Save the ResultSet for the target
of an update/delete to a VTI.
- Specified by:
setTargetVTIin interfaceorg.apache.derby.iapi.sql.Activation
getTargetVTI
public java.sql.ResultSet getTargetVTI()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Get the ResultSet for the target
of an update/delete to a VTI.
- Specified by:
getTargetVTIin interfaceorg.apache.derby.iapi.sql.Activation
markUnused
public void markUnused()
- Mark the activation as unused.
- Specified by:
markUnusedin interfaceorg.apache.derby.iapi.sql.Activation
isInUse
public boolean isInUse()
- Is the activation in use?
- Specified by:
isInUsein interfaceorg.apache.derby.iapi.sql.Activation
addWarning
public void addWarning(java.sql.SQLWarning w)
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Add a warning to the activation
- Specified by:
addWarningin interfaceorg.apache.derby.iapi.sql.Activation
getWarnings
public java.sql.SQLWarning getWarnings()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Returns the chained list of warnings. Returns null
if there are no warnings.
- Specified by:
getWarningsin interfaceorg.apache.derby.iapi.sql.Activation
clearWarnings
public void clearWarnings()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Clear the activation's warnings.
- Specified by:
clearWarningsin interfaceorg.apache.derby.iapi.sql.Activation
informOfRowCount
public void informOfRowCount(org.apache.derby.iapi.sql.execute.NoPutResultSet resultSet, long rowCount) throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Tell this activation that the given ResultSet was found to have
the given number of rows. This is used during execution to determine
whether a table has grown or shrunk. If a table's size changes
significantly, the activation may invalidate its PreparedStatement
to force recompilation.
Note that the association of row counts with ResultSets is kept
in the activation class, not in the activation itself. This
means that this method must be synchronized.
This method is not required to check the number of rows on each
call. Because of synchronization, this check is likely to be
expensive, so it may only check every hundred calls or so.
- Specified by:
informOfRowCountin interfaceorg.apache.derby.iapi.sql.Activation
isCursorActivation
public boolean isCursorActivation()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Is this Activation for a cursor?
- Specified by:
isCursorActivationin interfaceorg.apache.derby.iapi.sql.Activation
getConstantAction
public org.apache.derby.iapi.sql.execute.ConstantAction getConstantAction()
- Specified by:
getConstantActionin interfaceorg.apache.derby.iapi.sql.Activation
setParentResultSet
public void setParentResultSet(org.apache.derby.iapi.sql.execute.TemporaryRowHolder rs, java.lang.String resultSetId)
- Specified by:
setParentResultSetin interfaceorg.apache.derby.iapi.sql.Activation
getParentResultSet
public java.util.Vector getParentResultSet(java.lang.String resultSetId)
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - get the reference to parent table ResultSets, that will be needed by the
referential action dependent table scans.
- Specified by:
getParentResultSetin interfaceorg.apache.derby.iapi.sql.Activation
clearParentResultSets
public void clearParentResultSets()
- Specified by:
clearParentResultSetsin interfaceorg.apache.derby.iapi.sql.Activation
getParentResultSets
public java.util.Hashtable getParentResultSets()
- Specified by:
getParentResultSetsin interfaceorg.apache.derby.iapi.sql.Activation
setForUpdateIndexScan
public void setForUpdateIndexScan(org.apache.derby.iapi.sql.execute.CursorResultSet forUpdateResultSet)
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - beetle 3865: updateable cursor using index. A way of communication
between cursor activation and update activation.
- Specified by:
setForUpdateIndexScanin interfaceorg.apache.derby.iapi.sql.Activation
getForUpdateIndexScan
public org.apache.derby.iapi.sql.execute.CursorResultSet getForUpdateIndexScan()
- Specified by:
getForUpdateIndexScanin interfaceorg.apache.derby.iapi.sql.Activation
getDynamicResults
public java.sql.ResultSet[][] getDynamicResults()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Return the set of dynamical created result sets, for procedures.
Base implementation returns null, a generated class for a procedure overwrites
this with a real implementation.
- Specified by:
getDynamicResultsin interfaceorg.apache.derby.iapi.sql.Activation
getMaxDynamicResults
public int getMaxDynamicResults()
- Description copied from interface:
org.apache.derby.iapi.sql.Activation - Return the maximum number of dynamical created result sets from the procedure definition.
Base implementation returns 0, a generated class for a procedure overwrites
this with a real implementation.
- Specified by:
getMaxDynamicResultsin interfaceorg.apache.derby.iapi.sql.Activation
|
|||||||||
| Home >> All >> org >> apache >> derby >> impl >> [ sql overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.apache.derby.impl.sql.GenericActivationHolder