|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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
class CreateIndexConstantAction
ConstantAction to create an index either through a CREATE INDEX statement or as a backing index to a constraint.
Field Summary | |
---|---|
private java.lang.String[] |
columnNames
|
private UUID |
conglomerateUUID
|
private long |
conglomId
Conglomerate number for the conglomerate created by this constant action; -1L if this constant action has not been executed. |
private long |
droppedConglomNum
Conglomerate number of the physical conglomerate that we will "replace" using this constant action. |
private boolean |
forCreateTable
Is this for a CREATE TABLE, i.e. it is for a constraint declared in a CREATE TABLE statement that requires a backing index. |
private ExecRow |
indexTemplateRow
|
private java.lang.String |
indexType
|
private boolean[] |
isAscending
|
private boolean |
isConstraint
|
private java.util.Properties |
properties
|
private boolean |
unique
|
private boolean |
uniqueWithDuplicateNulls
|
Fields inherited from class org.apache.derby.impl.sql.execute.IndexConstantAction |
---|
indexName, schemaName, tableName |
Fields inherited from class org.apache.derby.impl.sql.execute.DDLSingleTableConstantAction |
---|
tableId |
Constructor Summary | |
---|---|
CreateIndexConstantAction(boolean forCreateTable,
boolean unique,
boolean uniqueWithDuplicateNulls,
java.lang.String indexType,
java.lang.String schemaName,
java.lang.String indexName,
java.lang.String tableName,
UUID tableId,
java.lang.String[] columnNames,
boolean[] isAscending,
boolean isConstraint,
UUID conglomerateUUID,
java.util.Properties properties)
Make the ConstantAction to create an index. |
|
CreateIndexConstantAction(ConglomerateDescriptor srcCD,
TableDescriptor td,
java.util.Properties properties)
Make a ConstantAction that creates a new physical conglomerate based on index information stored in the received descriptors. |
Method Summary | |
---|---|
void |
executeConstantAction(Activation activation)
This is the guts of the Execution-time logic for creating an index. |
(package private) long |
getCreatedConglomNumber()
Get the conglomerate number for the conglomerate that was created by this constant action. |
(package private) UUID |
getCreatedUUID()
Get the UUID for the conglomerate descriptor that was created (or re-used) by this constant action. |
(package private) ExecRow |
getIndexTemplateRow()
|
(package private) long |
getReplacedConglomNumber()
If the purpose of this constant action was to "replace" a dropped physical conglomerate, then this method returns the conglomerate number of the dropped conglomerate. |
private RowLocationRetRowSource |
loadSorter(ExecRow[] baseRows,
ExecIndexRow[] indexRows,
TransactionController tc,
GroupFetchScanController scan,
long sortId,
RowLocation[] rl)
Scan the base conglomerate and insert the keys into a sorter, returning a rowSource on the sorter. |
private void |
statementExceptionCleanup(ScanController scan,
ConglomerateController indexController)
Do necessary clean up (close down controllers, etc.) before throwing a statement exception. |
java.lang.String |
toString()
|
Methods inherited from class org.apache.derby.impl.sql.execute.IndexConstantAction |
---|
getIndexName, setIndexName |
Methods inherited from class org.apache.derby.impl.sql.execute.DDLSingleTableConstantAction |
---|
dropConglomerate, dropConglomerate, dropConstraint, dropConstraint, dropConstraint, executeConglomReplacement, getConglomReplacementAction, recreateUniqueConstraintBackingIndexAsUniqueWhenNotNull |
Methods inherited from class org.apache.derby.impl.sql.execute.DDLConstantAction |
---|
addColumnDependencies, adjustUDTDependencies, adjustUDTDependencies, constructToString, getAndCheckSchemaDescriptor, getSchemaDescriptorForCreate, lockTableForDDL, storeConstraintDependenciesOnPrivileges, storeViewTriggerDependenciesOnPrivileges |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final boolean forCreateTable
private boolean unique
private boolean uniqueWithDuplicateNulls
private java.lang.String indexType
private java.lang.String[] columnNames
private boolean[] isAscending
private boolean isConstraint
private UUID conglomerateUUID
private java.util.Properties properties
private ExecRow indexTemplateRow
private long conglomId
private long droppedConglomNum
Constructor Detail |
---|
CreateIndexConstantAction(boolean forCreateTable, boolean unique, boolean uniqueWithDuplicateNulls, java.lang.String indexType, java.lang.String schemaName, java.lang.String indexName, java.lang.String tableName, UUID tableId, java.lang.String[] columnNames, boolean[] isAscending, boolean isConstraint, UUID conglomerateUUID, java.util.Properties properties)
forCreateTable
- Being executed within a CREATE TABLE
statementunique
- True means it will be a unique indexuniqueWithDuplicateNulls
- True means index check and disallow
any duplicate key if key has no
column with a null value. If any
column in the key has a null value,
no checking is done and insert will
always succeed.indexType
- type of index (BTREE, for example)schemaName
- schema that table (and index)
lives in.indexName
- Name of the indextableName
- Name of table the index will be ontableId
- UUID of tablecolumnNames
- 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.CreateIndexConstantAction(ConglomerateDescriptor srcCD, TableDescriptor td, java.util.Properties properties)
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public void executeConstantAction(Activation activation) throws StandardException
A index is represented as:
activation
- The execution environment for this constant action.
StandardException
- Thrown on failureConglomerateDescriptor
,
SchemaDescriptor
,
ConstantAction.executeConstantAction(org.apache.derby.iapi.sql.Activation)
ExecRow getIndexTemplateRow()
long getCreatedConglomNumber()
long getReplacedConglomNumber()
UUID getCreatedUUID()
private void statementExceptionCleanup(ScanController scan, ConglomerateController indexController) throws StandardException
scan
- ScanController for the heapindexController
- ConglomerateController for the index
StandardException
private RowLocationRetRowSource loadSorter(ExecRow[] baseRows, ExecIndexRow[] indexRows, TransactionController tc, GroupFetchScanController scan, long sortId, RowLocation[] rl) throws StandardException
StandardException
- thrown on error
|
Built on Thu 2012-03-29 21:53:33+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |