org.apache.derby.impl.sql.execute
Class CreateIndexConstantAction
java.lang.Object
org.apache.derby.impl.sql.execute.GenericConstantAction
org.apache.derby.impl.sql.execute.DDLConstantAction
org.apache.derby.impl.sql.execute.DDLSingleTableConstantAction
org.apache.derby.impl.sql.execute.IndexConstantAction
org.apache.derby.impl.sql.execute.CreateIndexConstantAction
- All Implemented Interfaces:
- ConstantAction
- class CreateIndexConstantAction
- extends IndexConstantAction
This class describes actions that are ALWAYS performed for a
CREATE TABLE Statement at Execution time.
- Author:
- Jeff Lichtman Cribbed from from CreateTableConstantAction
Constructor Summary |
(package private) |
CreateIndexConstantAction(boolean unique,
java.lang.String indexType,
java.lang.String schemaName,
java.lang.String indexName,
java.lang.String tableName,
UUID tableId,
long conglomId,
java.lang.String[] columnNames,
boolean[] isAscending,
boolean isConstraint,
UUID conglomerateUUID,
java.util.Properties properties)
Make the ConstantAction for a CREATE INDEX statement. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
unique
private boolean unique
indexType
private java.lang.String indexType
conglomId
private long conglomId
columnNames
private java.lang.String[] columnNames
isAscending
private boolean[] isAscending
isConstraint
private boolean isConstraint
conglomerateUUID
private UUID conglomerateUUID
properties
private java.util.Properties properties
indexTemplateRow
private ExecRow indexTemplateRow
CreateIndexConstantAction
CreateIndexConstantAction(boolean unique,
java.lang.String indexType,
java.lang.String schemaName,
java.lang.String indexName,
java.lang.String tableName,
UUID tableId,
long conglomId,
java.lang.String[] columnNames,
boolean[] isAscending,
boolean isConstraint,
UUID conglomerateUUID,
java.util.Properties properties)
- Make the ConstantAction for a CREATE INDEX statement.
- Parameters:
unique
- True means it will be a unique indexindexType
- The type of index (BTREE, for example)indexName
- Name of the indextableName
- Name of table the index will be ontableId
- UUID of tableconglomId
- Conglomerate ID of the index, if known in advancecolumnNames
- Names of the columns in the index, in orderisAscending
- Array of booleans telling asc/desc on each columnisConstraint
- TRUE if index is backing up a constraint, else FALSEconglomerateUUID
- ID of conglomerateproperties
- The optional properties list associated with the index.
toString
public java.lang.String toString()
executeConstantAction
public void executeConstantAction(Activation activation)
throws StandardException
- This is the guts of the Execution-time logic for CREATE INDEX.
- Parameters:
activation
- The execution environment for this constant action.
- Throws:
StandardException
- Thrown on failure- See Also:
ConstantAction.executeConstantAction(org.apache.derby.iapi.sql.Activation)
getIndexTemplateRow
ExecRow getIndexTemplateRow()
statementExceptionCleanup
private void statementExceptionCleanup(ScanController scan,
ConglomerateController indexController)
throws StandardException
- Do necessary clean up (close down controllers, etc.) before throwing
a statement exception.
- Parameters:
scan
- ScanController for the heapindexController
- ConglomerateController for the index
- Returns:
- Nothing.
- Throws:
StandardException
loadSorter
private RowLocationRetRowSource loadSorter(ExecRow[] baseRows,
ExecIndexRow[] indexRows,
TransactionController tc,
GroupFetchScanController scan,
long sortId,
RowLocation[] rl)
throws StandardException
- Scan the base conglomerate and insert the keys into a sorter,
returning a rowSource on the sorter.
- Returns:
- RowSource on the sorted index keys.
- Throws:
StandardException
- thrown on error
Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.