TableDescriptor(DataDictionary dataDictionary, String tableName, SchemaDescriptor schema, int tableType, boolean onCommitDeleteRows, boolean onRollbackDeleteRows) Constructor for a TableDescriptor (this is for a temporary table).
Parameters: dataDictionary - The data dictionary that this descriptor lives in Parameters: tableName - The name of the temporary table Parameters: schema - The schema descriptor for this table. Parameters: tableType - An integer identifier for the type of the table : declared global temporary table Parameters: onCommitDeleteRows - If true, on commit delete rows else on commit preserve rows of temporary table. Parameters: onRollbackDeleteRows - If true, on rollback, delete rows from temp tables which were logically modified.
getAllRelevantConstraints(int statementType, boolean skipCheckConstraints, int[] changedColumnIds, boolean[] needsDeferredProcessing, ConstraintDescriptorList relevantConstraints) Gets all of the relevant constraints for a statement, given its
statement type and its list of updated columns.
Parameters: statementType - As defined in StatementType. Parameters: skipCheckConstraints - Skip check constraints Parameters: changedColumnIds - If null, all columns being changed, otherwise arrayof 1-based column ids for columns being changed Parameters: needsDeferredProcessing - IN/OUT.
public void
getAllRelevantTriggers(int statementType, int[] changedColumnIds, GenericDescriptorList relevantTriggers) Builds a list of all triggers which are relevant to a
given statement type, given a list of updated columns.
Parameters: statementType - defined in StatementType Parameters: changedColumnIds - array of changed columns Parameters: relevantTriggers - IN/OUT.
public long[]
getAutoincIncrementArray() gets an array of increment values for autoincrement columns in the target
table.
getColumnDescriptor(String columnName) Get the descriptor for a column in the table,
either by the column name or by its ordinal position (column number).
getConglomerateDescriptor(long conglomerateNumber) Gets a conglomerate descriptor for the given table and conglomerate number.
Parameters: conglomerateNumber - The conglomerate numberwe're interested in A ConglomerateDescriptor describing the requestedconglomerate.
getConglomerateDescriptor(UUID conglomerateUUID) Gets a conglomerate descriptor for the given table and conglomerate UUID String.
Parameters: conglomerateUUID - The UUID for the conglomeratewe're interested in A ConglomerateDescriptor describing the requestedconglomerate.
resetHeapConglomNumber() Sets the heapConglomNumber to -1 for temporary table since the table was dropped and recreated at the commit time
and hence its conglomerate id has changed.
statisticsExist(ConglomerateDescriptor cd) Are there statistics for this particular conglomerate.
Parameters: cd - Conglomerate/Index for which we want to check if statisticsexist.
public TableDescriptor(DataDictionary dataDictionary, String tableName, SchemaDescriptor schema, int tableType, boolean onCommitDeleteRows, boolean onRollbackDeleteRows)(Code)
Constructor for a TableDescriptor (this is for a temporary table).
Parameters: dataDictionary - The data dictionary that this descriptor lives in Parameters: tableName - The name of the temporary table Parameters: schema - The schema descriptor for this table. Parameters: tableType - An integer identifier for the type of the table : declared global temporary table Parameters: onCommitDeleteRows - If true, on commit delete rows else on commit preserve rows of temporary table. Parameters: onRollbackDeleteRows - If true, on rollback, delete rows from temp tables which were logically modified. true is the only supported value
Constructor for a TableDescriptor.
Parameters: dataDictionary - The data dictionary that this descriptor lives in Parameters: tableName - The name of the table Parameters: schema - The schema descriptor for this table. Parameters: tableType - An integer identifier for the type of the table(base table, view, etc.) Parameters: lockGranularity - The lock granularity.
Gets all of the relevant constraints for a statement, given its
statement type and its list of updated columns.
Parameters: statementType - As defined in StatementType. Parameters: skipCheckConstraints - Skip check constraints Parameters: changedColumnIds - If null, all columns being changed, otherwise arrayof 1-based column ids for columns being changed Parameters: needsDeferredProcessing - IN/OUT. true if the statement already needsdeferred processing. set while evaluating thisroutine if a trigger or constraint requiresdeferred processing Parameters: relevantConstraints - IN/OUT. Empty list is passed in. We hang constraints on it as we go. exception: StandardException - Thrown on error
Builds a list of all triggers which are relevant to a
given statement type, given a list of updated columns.
Parameters: statementType - defined in StatementType Parameters: changedColumnIds - array of changed columns Parameters: relevantTriggers - IN/OUT. Passed in as an empty list. Filled in as we go. exception: StandardException - Thrown on error
gets an array of increment values for autoincrement columns in the target
table. If column is not an autoincrement column, then increment value is
0. If table has no autoincrement columns, returns NULL.
array containing the increment values of autoincrementcolumns.
Get the descriptor for a column in the table,
either by the column name or by its ordinal position (column number).
Returns NULL for columns that do not exist.
Parameters: columnName - A String containing the name of the column A ColumnDescriptor describing the column
Gets a conglomerate descriptor for the given table and conglomerate number.
Parameters: conglomerateNumber - The conglomerate numberwe're interested in A ConglomerateDescriptor describing the requestedconglomerate. Returns NULL if no such conglomerate. exception: StandardException - Thrown on failure
Gets a conglomerate descriptor for the given table and conglomerate UUID String.
Parameters: conglomerateUUID - The UUID for the conglomeratewe're interested in A ConglomerateDescriptor describing the requestedconglomerate. Returns NULL if no such conglomerate. exception: StandardException - Thrown on failure
Gets a ConglomerateDescriptor[] to loop through all the conglomerate descriptors
for the table.
A ConglomerateDescriptor[] for looping through the table's conglomerates exception: StandardException - Thrown on failure
Gets array of conglomerate descriptors for the given table and
conglomerate number. More than one descriptors if duplicate indexes
share one conglomerate.
Parameters: conglomerateNumber - The conglomerate numberwe're interested in Array of ConglomerateDescriptors with the requestedconglomerate number. Returns size 0 array if no such conglomerate. exception: StandardException - Thrown on failure
Gets array of conglomerate descriptors for the given table and
conglomerate UUID. More than one descriptors if duplicate indexes
share one conglomerate.
Parameters: conglomerateUUID - The conglomerate UUIDwe're interested in Array of ConglomerateDescriptors with the requestedconglomerate UUID. Returns size 0 array if no such conglomerate. exception: StandardException - Thrown on failure
Gets an ExecRow for rows stored in the table this describes.
Parameters: cm - Current ContextManager the row. exception: StandardException - Thrown on failure
Gets the id for the heap conglomerate of the table.
There may also be keyed conglomerates, these are
stored separately in the conglomerates table.
the id of the heap conglomerate for the table. exception: StandardException - Thrown on error
Gets an object which lists out all the index row generators on a table together
with their conglomerate ids.
An object to list out the index row generators. exception: StandardException - Thrown on failure
Gets the highest column id in the table. For now this is the same as
the number of columns. However, in the future, after we implement
ALTER TABLE DROP COLUMN, this correspondence won't hold any longer.
the highest column ID in the table exception: StandardException - Thrown on error
Gets an identifier telling what type of table this is
(base table, declared global temporary table, view, etc.)
An identifier telling what type of table this is.
Gets the on commit behavior for the declared global temporary table.
A boolean representing the on commit behavior for the declared global temporary table.
Gets the on rollback behavior for the declared global temporary table.
A boolean representing the on rollback behavior for the declared global temporary table.
Is this provider persistent? A stored dependency will be required
if both the dependent and provider are persistent.
boolean Whether or not this provider is persistent.
Remove this descriptor. Warning, removes by using object
reference, not uuid.
Parameters: cd - constraint descriptor exception: StandardException - on error
Sets the heapConglomNumber to -1 for temporary table since the table was dropped and recreated at the commit time
and hence its conglomerate id has changed. This is used for temporary table descriptors only
For this conglomerate (index), return the selectivity of the first
numKeys. This basically returns the reciprocal of the number of unique
values in the leading numKey columns of the index. It is assumed that
statistics exist for the conglomerate if this function is called.
Parameters: cd - ConglomerateDescriptor (Index) whosecardinality we are interested in. Parameters: numKeys - Number of leading columns of the index for whichcardinality is desired.
Are there statistics for this particular conglomerate.
Parameters: cd - Conglomerate/Index for which we want to check if statisticsexist. cd can be null in which case user wants to know if there are anystatistics at all on the table.
Does the table have an autoincrement column or not?
TRUE if the table has atleast one autoincrement column, falseotherwise
tableNameEquals
public boolean tableNameEquals(String otherTableName, String otherSchemaName)(Code)
Compare the tables descriptors based on the names.
Null schema names match.
Parameters: otherTableName - the other table name Parameters: otherSchemaName - the other schema name boolean Whether or not the 2 TableNames are equal.