|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.derby.impl.sql.catalog.DataDictionaryImpl
This abstract class contains the common code for the "regular" and limited data dictionaries. The limited configuration puts an upper limit on the number of tables a user is allowed to create. This class provides the entire implementation of DataDictionary, and ModuleControl, except for the stop() method, which is to be provided by a non-abstract super-class. The reason for putting the stop() method in the super-class is to prevent someone from inadvertently changing this to a non-abstract class. This class is shipped with both the limited and non-limited configurations, and we don't want anyone to be able to cheat by booting this class instead of booting the super-class.
| Field Summary | |
protected AccessFactory |
af
|
protected boolean |
booting
|
private TransactionController |
bootingTC
|
(package private) boolean |
builtinSchemasAreFromLCC
|
(package private) ShExLockable |
cacheCoordinator
|
(package private) int |
cacheMode
|
private java.util.GregorianCalendar |
calendarForLastSystemSQLName
|
private static java.lang.String |
CFG_SYSCOLUMNS_ID
|
private static java.lang.String |
CFG_SYSCOLUMNS_INDEX1_ID
|
private static java.lang.String |
CFG_SYSCOLUMNS_INDEX2_ID
|
private static java.lang.String |
CFG_SYSCONGLOMERATES_ID
|
private static java.lang.String |
CFG_SYSCONGLOMERATES_INDEX1_ID
|
private static java.lang.String |
CFG_SYSCONGLOMERATES_INDEX2_ID
|
private static java.lang.String |
CFG_SYSCONGLOMERATES_INDEX3_ID
|
private static java.lang.String |
CFG_SYSSCHEMAS_ID
|
private static java.lang.String |
CFG_SYSSCHEMAS_INDEX1_ID
|
private static java.lang.String |
CFG_SYSSCHEMAS_INDEX2_ID
|
private static java.lang.String |
CFG_SYSTABLES_ID
|
private static java.lang.String |
CFG_SYSTABLES_INDEX1_ID
|
private static java.lang.String |
CFG_SYSTABLES_INDEX2_ID
|
protected boolean |
convertIdToLower
|
private TabInfo[] |
coreInfo
|
DataDescriptorGenerator |
dataDescriptorGenerator
|
(package private) int |
ddlUsers
|
protected SchemaDescriptor |
declaredGlobalTemporaryTablesSchemaDesc
|
private java.lang.String |
declaredGlobalTemporaryTablesSchemaName
|
private DD_Version |
dictionaryVersion
Dictionary version of the on-disk database |
protected DependencyManager |
dmgr
|
protected DataValueFactory |
dvf
|
(package private) int |
engineType
|
private ExecutionFactory |
exFactory
|
LockFactory |
lockFactory
|
(package private) CacheManager |
nameTdCache
|
private TabInfo[] |
noncoreInfo
|
private static java.lang.String[] |
nonCoreNames
|
private static int |
NUM_CORE
|
private static int |
NUM_NONCORE
|
(package private) CacheManager |
OIDTdCache
|
(package private) int |
readersInDDLMode
|
boolean |
readOnlyUpgrade
True if the database is read only and requires some form of upgrade, that makes the stored prepared statements invalid. |
private DD_Version |
softwareVersion
Dictionary version of the currently running engine |
private java.util.Hashtable |
spsIdHash
|
private CacheManager |
spsNameCache
|
private java.lang.String |
spsSet
|
(package private) java.util.Properties |
startupParameters
|
(package private) int |
stmtCacheSize
|
private static int |
SYSCOLUMNS_CORE_NUM
|
private static int |
SYSCONGLOMERATES_CORE_NUM
|
protected SchemaDescriptor |
sysIBMSchemaDesc
|
private java.lang.String |
sysIBMSchemaName
|
private static int |
SYSSCHEMAS_CORE_NUM
|
private static int |
SYSTABLES_CORE_NUM
|
protected SchemaDescriptor |
systemDiagSchemaDesc
|
private java.lang.String |
systemDiagSchemaName
|
protected SchemaDescriptor |
systemSchemaDesc
|
private java.lang.String |
systemSchemaName
|
private static java.lang.String[] |
systemSchemaNames
List of all "system" schemas This list should contain all schema's used by the system and are created when the database is created. |
private int |
systemSQLNameNumber
|
protected SchemaDescriptor |
systemUtilSchemaDesc
|
private java.lang.String |
systemUtilSchemaName
|
(package private) int |
tdCacheSize
|
private long |
timeForLastSystemSQLName
|
protected UUIDFactory |
uuidFactory
|
| Constructor Summary | |
DataDictionaryImpl()
|
|
| Method Summary | |
boolean |
activeConstraint(ConstraintDescriptor constraint)
Reports whether an individual constraint must be enforced. |
void |
addConstraintDescriptor(ConstraintDescriptor descriptor,
TransactionController tc)
Adds the given ConstraintDescriptor to the data dictionary, associated with the given table and constraint type. |
void |
addDescriptor(TupleDescriptor td,
TupleDescriptor parent,
int catalogNumber,
boolean duplicatesAllowed,
TransactionController tc)
Adds a descriptor to a system catalog identified by the catalogNumber. |
void |
addDescriptorArray(TupleDescriptor[] td,
TupleDescriptor parent,
int catalogNumber,
boolean allowDuplicates,
TransactionController tc)
array version of addDescriptor. |
private void |
addDescriptorNow(TupleDescriptor td,
TupleDescriptor parent,
int catalogNumber,
boolean duplicatesAllowed,
TransactionController tc,
boolean wait)
|
void |
addSPSDescriptor(SPSDescriptor descriptor,
TransactionController tc,
boolean wait)
Adds the given SPSDescriptor to the data dictionary, associated with the given table and constraint type. |
private void |
addSPSParams(SPSDescriptor spsd,
TransactionController tc,
boolean wait)
Add a column in SYS.SYSCOLUMNS for each parameter in the parameter list. |
private void |
addSubKeyConstraint(KeyConstraintDescriptor descriptor,
TransactionController tc)
Add the matching row to syskeys when adding a unique or primary key constraint |
(package private) void |
addSYSCOLUMNSIndex2Property(TransactionController tc,
long index2ConglomerateNumber)
|
private SchemaDescriptor |
addSystemSchema(java.lang.String schema_name,
java.lang.String schema_uuid,
TransactionController tc)
Add a system schema to the database. |
private void |
addSystemTableToDictionary(TabInfo ti,
SchemaDescriptor sd,
TransactionController tc,
DataDescriptorGenerator ddg)
Add the required entries to the data dictionary for a System table. |
void |
addTableDescriptorToOtherCache(TableDescriptor td,
Cacheable c)
Add a table descriptor to the "other" cache. |
void |
boot(boolean create,
java.util.Properties startParams)
Start-up method for this instance of the data dictionary. |
private ConglomerateDescriptor |
bootstrapOneIndex(SchemaDescriptor sd,
TransactionController tc,
DataDescriptorGenerator ddg,
TabInfo ti,
int indexNumber,
long heapConglomerateNumber)
|
private void |
bootStrapSystemIndexes(SchemaDescriptor sd,
TransactionController tc,
DataDescriptorGenerator ddg,
TabInfo ti)
Infrastructure work for indexes on catalogs. |
boolean |
canSupport(java.util.Properties startParams)
Currently, all this routine does is check to see if the Replication property has been turned on for this database. |
boolean |
checkVersion(int requiredMajorVersion,
java.lang.String feature)
Check to see if a database has been upgraded to the required level in order to use a language feature. |
void |
clearCaches()
Clear all of the DataDictionary caches. |
private void |
clearNoncoreTable(int nonCoreNum)
|
(package private) void |
clearSPSPlans()
Mark all SPS plans in the data dictionary invalid. |
RowLocation[] |
computeAutoincRowLocations(TransactionController tc,
TableDescriptor td)
returns an array of RowLocations corresponding to the autoincrement columns in the table. |
private RowLocation |
computeRowLocation(TransactionController tc,
TableDescriptor td,
java.lang.String columnName)
Computes the RowLocation in SYSCOLUMNS for a particular autoincrement column. |
(package private) void |
create_10_1_system_procedures(TransactionController tc,
UUID sysUtilUUID)
Create system procedures added in version 10.1. |
private void |
create_SYSCS_procedures(TransactionController tc)
Create system procedures Used to add the system procedures to the database when it is created. |
protected void |
create_SYSIBM_procedures(TransactionController tc)
Create system procedures in SYSIBM Used to add the system procedures to the database when it is created. |
private long |
createConglomerate(java.lang.String name,
TransactionController tc,
ExecRow rowTemplate,
java.util.Properties properties)
Create a conglomerate for a system table |
protected void |
createDictionaryTables(java.util.Properties params,
TransactionController tc,
DataDescriptorGenerator ddg)
Create all the required dictionary tables. |
private void |
createSPSSet(TransactionController tc,
boolean net,
UUID schemaID)
Create a set of stored prepared statements from a properties file. |
private void |
createSystemProcedureOrFunction(java.lang.String routine_name,
UUID schema_uuid,
java.lang.String[] arg_names,
TypeDescriptor[] arg_types,
int num_out_param,
int num_result_sets,
short routine_sql_control,
TypeDescriptor return_type,
TransactionController tc)
Generic create procedure routine. |
(package private) void |
createSystemSps(TransactionController tc)
Create system built-in metadata stored prepared statements. |
private void |
debugGenerateInfo(java.lang.StringBuffer strbuf,
TransactionController tc,
ConglomerateController heapCC,
TabInfo ti,
int indexId)
|
void |
doneReading(int mode,
LanguageConnectionContext lcc)
Inform this DataDictionary that we have finished reading it. |
void |
dropAliasDescriptor(AliasDescriptor ad,
TransactionController tc)
Drop a AliasDescriptor from the DataDictionary |
void |
dropAllColumnDescriptors(UUID tableID,
TransactionController tc)
Drops all column descriptors from the given table. |
void |
dropAllConglomerateDescriptors(TableDescriptor td,
TransactionController tc)
Drops all conglomerates associated with a table. |
void |
dropAllConstraintDescriptors(TableDescriptor table,
TransactionController tc)
Drops all ConstraintDescriptors from the data dictionary that are associated with the given table, |
void |
dropColumnDescriptor(UUID tableID,
java.lang.String columnName,
TransactionController tc)
Given a column name and a table ID, drops the column descriptor from the table. |
private void |
dropColumnDescriptorCore(TransactionController tc,
ExecIndexRow keyRow)
Delete the appropriate rows from syscolumns when dropping 1 or more columns. |
void |
dropConglomerateDescriptor(ConglomerateDescriptor conglomerate,
TransactionController tc)
Drops a conglomerate descriptor |
void |
dropConstraintDescriptor(TableDescriptor table,
ConstraintDescriptor descriptor,
TransactionController tc)
Drops the given ConstraintDescriptor that is associated with the given table and constraint type from the data dictionary. |
void |
dropDependentsStoredDependencies(UUID dependentsUUID,
TransactionController tc)
Remove all of the stored dependencies for a given dependent's ID from the data dictionary. |
void |
dropFileInfoDescriptor(FileInfoDescriptor fid)
Drop a FileDescriptor from the datadictionary. |
void |
dropSchemaDescriptor(java.lang.String schemaName,
TransactionController tc)
Drop the descriptor for a schema, given the schema's name |
void |
dropSPSDescriptor(SPSDescriptor descriptor,
TransactionController tc)
Drops the given SPSDescriptor. |
void |
dropSPSDescriptor(UUID uuid,
TransactionController tc)
Drops the given SPSDescriptor. |
void |
dropStatisticsDescriptors(UUID tableUUID,
UUID referenceUUID,
TransactionController tc)
Drops all statistics descriptors for a given table/index column combination. |
void |
dropStoredDependency(DependencyDescriptor dd,
TransactionController tc)
Drop a single dependency from the data dictionary. |
private void |
dropSubCheckConstraint(UUID constraintId,
TransactionController tc)
Drop the matching row from syschecks when dropping a check constraint. |
private void |
dropSubKeyConstraint(ConstraintDescriptor constraint,
TransactionController tc)
Drop the matching row from syskeys when dropping a primary key or unique constraint. |
void |
dropTableDescriptor(TableDescriptor td,
SchemaDescriptor schema,
TransactionController tc)
Drop the table descriptor. |
void |
dropTriggerDescriptor(TriggerDescriptor descriptor,
TransactionController tc)
Drops the given TriggerDescriptor. |
void |
dropViewDescriptor(ViewDescriptor vd,
TransactionController tc)
Drops the view descriptor from the data dictionary. |
private StandardException |
duplicateDescriptorException(TupleDescriptor tuple,
TupleDescriptor parent)
|
void |
faultInTabInfo(TabInfo ti)
Finishes building a TabInfo if it hasn't already been faulted in. |
private TableDescriptor |
finishTableDescriptor(TableDescriptor td)
Finish filling in the TableDescriptor. |
ConstraintDescriptorList |
getActiveConstraintDescriptors(ConstraintDescriptorList cdl)
Convert a constraint descriptor list into a list of active constraints, that is, constraints which must be enforced. |
AliasDescriptor |
getAliasDescriptor(java.lang.String schemaId,
java.lang.String aliasName,
char nameSpace)
Get a AliasDescriptor by alias name and name space. |
AliasDescriptor |
getAliasDescriptor(UUID uuid)
Get a AliasDescriptor given its UUID. |
private ConstraintDescriptorList |
getAllConstraintDescriptors()
Get every constraint in this database. |
java.util.List |
getAllDependencyDescriptorsList()
Build and return an List with DependencyDescriptors for all of the stored dependencies. |
java.util.List |
getAllSPSDescriptors()
Get every statement in this database. |
private GenericDescriptorList |
getAllTriggerDescriptors()
Get every trigger in this database. |
private long |
getBootParameter(java.util.Properties startParams,
java.lang.String key,
boolean required)
|
private void |
getBuiltinSchemaNames()
|
private void |
getBuiltinSchemas()
|
int |
getCacheMode()
Returns the cache mode of the data dictionary. |
ColumnDescriptor |
getColumnDescriptorByDefaultId(UUID uuid)
Get a ColumnDescriptor given its Default ID. |
private void |
getColumnDescriptorsScan(TableDescriptor td)
Populate the ColumnDescriptorList for the specified TableDescriptor. |
private void |
getColumnDescriptorsScan(UUID uuid,
ColumnDescriptorList cdl,
TupleDescriptor td)
Populate the ColumnDescriptorList for the specified TableDescriptor. |
ConglomerateDescriptor |
getConglomerateDescriptor(long conglomerateNumber)
Get a ConglomerateDescriptor given its conglomerate number. |
ConglomerateDescriptor |
getConglomerateDescriptor(java.lang.String indexName,
SchemaDescriptor sd,
boolean forUpdate)
Gets a conglomerate descriptor for the named index in the given schema, getting an exclusive row lock on the matching row in sys.sysconglomerates (for DDL concurrency) if requested. |
ConglomerateDescriptor |
getConglomerateDescriptor(UUID uuid)
Get a ConglomerateDescriptor given its UUID. |
ConglomerateDescriptor[] |
getConglomerateDescriptors(long conglomerateNumber)
Get an array of conglomerate descriptors for the given conglomerate number. |
ConglomerateDescriptor[] |
getConglomerateDescriptors(UUID uuid)
Get an array of ConglomerateDescriptors given the UUID. |
private void |
getConglomerateDescriptorsScan(TableDescriptor td)
Populate the ConglomerateDescriptorList for the specified TableDescriptor by scanning sysconglomerates. |
ConstraintDescriptor |
getConstraintDescriptor(java.lang.String constraintName,
UUID schemaID)
Get a ConstraintDescriptor given its name and schema ID. |
ConstraintDescriptor |
getConstraintDescriptor(TableDescriptor td,
UUID uuid)
Get the constraint descriptor given a table and the UUID String of the backing index. |
ConstraintDescriptor |
getConstraintDescriptor(UUID uuid)
Get a ConstraintDescriptor given its UUID. |
ConstraintDescriptor |
getConstraintDescriptorById(TableDescriptor td,
UUID uuid)
Get the constraint descriptor given a table and the UUID String of the constraint |
ConstraintDescriptor |
getConstraintDescriptorByName(TableDescriptor td,
SchemaDescriptor sd,
java.lang.String constraintName,
boolean forUpdate)
Get the constraint descriptor given a TableDescriptor and the constraint name. |
ConstraintDescriptorList |
getConstraintDescriptors(TableDescriptor td)
Load up the constraint descriptor list for this table descriptor and return it. |
private void |
getConstraintDescriptorsScan(TableDescriptor td,
boolean forUpdate)
Populate the ConstraintDescriptorList for the specified TableDescriptor. |
protected TupleDescriptor |
getConstraintDescriptorViaHeap(ScanQualifier[][] scanQualifiers,
TabInfo ti,
TupleDescriptor parentTupleDescriptor,
java.util.List list)
Return a (single or list of) catalog row descriptor(s) from SYSCONSTRAINTS through a heap scan |
protected ConstraintDescriptor |
getConstraintDescriptorViaIndex(int indexId,
ExecIndexRow keyRow,
TabInfo ti,
TableDescriptor td,
ConstraintDescriptorList dList,
boolean forUpdate)
Return a (single or list of) ConstraintDescriptor(s) from SYSCONSTRAINTS where the access is from the index to the heap. |
java.util.List |
getConstraints(UUID uuid,
int indexId,
int columnNum)
Return an List which of the relevant column matching the indexed criteria. |
TableDescriptor |
getConstraintTableDescriptor(UUID constraintId)
Return a table descriptor corresponding to the TABLEID field in SYSCONSTRAINTS where CONSTRAINTID matches the constraintId passsed in. |
TabInfo |
getCoreCatalog(int coreNum)
Get core catalog info. |
DataDescriptorGenerator |
getDataDescriptorGenerator()
Get a DataDescriptorGenerator, through which we can create objects to be stored in the DataDictionary. |
DataValueFactory |
getDataValueFactory()
Get a DataValueFactory, through which we can create data value objects. |
SchemaDescriptor |
getDeclaredGlobalTemporaryTablesSchemaDescriptor()
Get the descriptor for the declared global temporary table schema which is always named "SESSION". |
DependencyManager |
getDependencyManager()
returns the dependencymanager associated with this datadictionary. |
java.util.List |
getDependentsDescriptorList(java.lang.String dependentID)
Gets a list of the dependency descriptors for the given dependent's id. |
protected TupleDescriptor |
getDescriptorViaHeap(ScanQualifier[][] scanQualifiers,
TabInfo ti,
TupleDescriptor parentTupleDescriptor,
java.util.List list)
Return a (single or list of) catalog row descriptor(s) from a system table where the access a heap scan |
private TupleDescriptor |
getDescriptorViaIndex(int indexId,
ExecIndexRow keyRow,
ScanQualifier[][] scanQualifiers,
TabInfo ti,
TupleDescriptor parentTupleDescriptor,
java.util.List list,
boolean forUpdate)
Return a (single or list of) catalog row descriptor(s) from a system table where the access is from the index to the heap. |
int |
getEngineType()
|
ExecutionFactory |
getExecutionFactory()
Get ExecutionFactory associated with this database. |
FileInfoDescriptor |
getFileInfoDescriptor(SchemaDescriptor sd,
java.lang.String name)
Get a FileInfoDescriptor given its SQL name and schema name. |
FileInfoDescriptor |
getFileInfoDescriptor(UUID id)
Get a FileInfoDescriptor given its id. |
private FileInfoDescriptor |
getFileInfoDescriptorIndex1Scan(UUID schemaId,
java.lang.String name)
Scan sysfiles_index1 (schemaid,name) for a match. |
private FileInfoDescriptor |
getFileInfoDescriptorIndex2Scan(UUID id)
Scan sysfiles_index2 (id) for a match. |
ConstraintDescriptorList |
getForeignKeys(UUID constraintId)
Return a list of foreign keys constraints referencing this constraint. |
static ExecIndexRow |
getIndexRowFromHeapRow(IndexRowGenerator irg,
RowLocation rl,
ExecRow heapRow)
Get an index row based on a row from the heap. |
private static LanguageConnectionContext |
getLCC()
|
private TabInfo |
getNonCoreTI(int catalogNumber)
Get a TabInfo for a non-core table. |
protected TabInfo |
getNonCoreTIByNumber(int catalogNumber)
returns the tabinfo for a non core system catalog. |
java.util.List |
getProvidersDescriptorList(java.lang.String providerID)
Gets a list of the dependency descriptors for the given provider's id. |
private java.util.Properties |
getQueryDescriptions(boolean net)
|
java.util.List |
getRoutineList(java.lang.String schemaID,
java.lang.String routineName,
char nameSpace)
Get the list of routines matching the schema and routine name. |
RowLocation |
getRowLocationTemplate(LanguageConnectionContext lcc,
TableDescriptor td)
|
SchemaDescriptor |
getSchemaDescriptor(java.lang.String schemaName,
TransactionController tc,
boolean raiseError)
Get the descriptor for the named schema. |
SchemaDescriptor |
getSchemaDescriptor(UUID schemaId,
TransactionController tc)
Get the descriptor for the named schema. |
NumberDataValue |
getSetAutoincrementValue(RowLocation rl,
TransactionController tc,
boolean doUpdate,
NumberDataValue newValue,
boolean wait)
getSetAutoincrementValue fetches the autoincrement value from SYSCOLUMNS given a row location. |
SPSDescriptor |
getSPSDescriptor(java.lang.String stmtName,
SchemaDescriptor sd)
Get a SPSDescriptor given its name. |
SPSDescriptor |
getSPSDescriptor(UUID uuid)
Get a SPSDescriptor given its UUID. |
private SPSDescriptor |
getSPSDescriptorIndex1Scan(java.lang.String stmtName,
java.lang.String schemaUUID)
Scan sysschemas_index1 (stmtname, schemaid) for a match. |
private SPSDescriptor |
getSPSDescriptorIndex2Scan(java.lang.String stmtUUID)
Scan sysstatements_index2 (stmtid) for a match. |
DataTypeDescriptor[] |
getSPSParams(SPSDescriptor spsd,
java.util.Vector defaults)
Get all the parameter descriptors for an SPS. |
java.util.List |
getStatisticsDescriptors(TableDescriptor td)
get all the statistiscs descriptors for a given table. |
private SubCheckConstraintDescriptor |
getSubCheckConstraint(UUID constraintId)
Get a SubCheckConstraintDescriptor from syschecks for the specified constraint id. |
SubKeyConstraintDescriptor |
getSubKeyConstraint(UUID constraintId,
int type)
Get a SubKeyConstraintDescriptor from syskeys or sysforeignkeys for the specified constraint id. |
long |
getSYSCOLUMNSHeapConglomerateNumber()
Get the heap conglomerate number for SYS.SYSCOLUMNS. |
SchemaDescriptor |
getSysIBMSchemaDescriptor()
Get the descriptor for the SYSIBM schema. |
SchemaDescriptor |
getSystemDiagSchemaDescriptor()
Get the descriptor for the SYSCS_DIAG system schema. |
SchemaDescriptor |
getSystemSchemaDescriptor()
Get the descriptor for the system schema. |
java.lang.String |
getSystemSQLName()
Returns a unique system generated name of the form SQLyymmddhhmmssxxn yy - year, mm - month, dd - day of month, hh - hour, mm - minute, ss - second, xx - the first 2 digits of millisec because we don't have enough space to keep the exact millisec value, n - number between 0-9 The number at the end is to handle more than one system generated name request came at the same time. |
SchemaDescriptor |
getSystemUtilSchemaDescriptor()
Get the descriptor for the SYSCS_UTIL system schema. |
TabInfo |
getTabInfo(java.lang.String tableName)
Get the tabinfo of a system catalog. |
TableDescriptor |
getTableDescriptor(java.lang.String tableName,
SchemaDescriptor schema)
Get the descriptor for the named table within the given schema. |
TableDescriptor |
getTableDescriptor(UUID tableID)
Get the descriptor for the table with the given UUID. |
private TableDescriptor |
getTableDescriptorIndex1Scan(java.lang.String tableName,
java.lang.String schemaUUID)
Scan systables_index1 (tablename, schemaid) for a match. |
private TableDescriptor |
getTableDescriptorIndex2Scan(java.lang.String tableUUID)
Scan systables_index2 (tableid) for a match. |
TransactionController |
getTransactionCompile()
Get the TransactionController to use, when not passed in as a parameter. |
TransactionController |
getTransactionExecute()
Get the TransactionController to use, when not passed in as a parameter. |
TriggerDescriptor |
getTriggerDescriptor(java.lang.String name,
SchemaDescriptor sd)
Get the stored prepared statement descriptor given a sps name. |
TriggerDescriptor |
getTriggerDescriptor(UUID uuid)
Get a TriggerDescriptor given its UUID. |
GenericDescriptorList |
getTriggerDescriptors(TableDescriptor td)
Load up the trigger descriptor list for this table descriptor and return it. |
private void |
getTriggerDescriptorsScan(TableDescriptor td,
boolean forUpdate)
Populate the GenericDescriptorList for the specified TableDescriptor. |
SPSDescriptor |
getUncachedSPSDescriptor(TableKey stmtKey)
This method can get called from the DataDictionary cache. |
protected SPSDescriptor |
getUncachedSPSDescriptor(UUID stmtId)
This method can get called from the DataDictionary cache. |
(package private) TableDescriptor |
getUncachedTableDescriptor(TableKey tableKey)
This method can get called from the DataDictionary cache. |
protected TableDescriptor |
getUncachedTableDescriptor(UUID tableID)
This method can get called from the DataDictionary cache. |
UUIDFactory |
getUUIDFactory()
Get the UUID Factory. |
private UUID |
getUUIDForCoreTable(java.lang.String tableName,
java.lang.String schemaUUID,
TransactionController tc)
Get the UUID for the specified system table. |
DataValueDescriptor |
getValueAsDVD(UUID uuid)
Converts a UUID to an DataValueDescriptor. |
ViewDescriptor |
getViewDescriptor(TableDescriptor td)
Gets the viewDescriptor for the view given the TableDescriptor. |
ViewDescriptor |
getViewDescriptor(UUID uuid)
Gets the viewDescriptor for the view with the given UUID. |
private ViewDescriptor |
getViewDescriptorScan(TableDescriptor tdi)
Get the information for the view from sys.sysviews. |
java.util.Hashtable |
hashAllConglomerateDescriptorsByNumber(TransactionController tc)
Get all of the ConglomerateDescriptors in the database and hash them by conglomerate number. |
java.util.Hashtable |
hashAllTableDescriptorsByTableId(TransactionController tc)
Get all of the TableDescriptors in the database and hash them by TableId This is useful as a performance optimization for the locking VTIs. |
void |
initializeCatalogInfo()
Initialize catalog information. |
private void |
initializeCoreInfo()
Initialized the core info array. |
private void |
initializeNoncoreInfo()
Initialized the noncore info array. |
void |
initSystemIndexVariables(DataDescriptorGenerator ddg,
TabInfo ti,
int indexNumber)
|
protected void |
initSystemIndexVariables(TabInfo ti)
|
void |
invalidateAllSPSPlans()
Invalidate all the stored plans in SYS.SYSSTATEMENTS. |
boolean |
isSchemaEmpty(SchemaDescriptor sd)
Indicate whether there is anything in the particular schema. |
protected boolean |
isSchemaReferenced(TransactionController tc,
TabInfo ti,
int indexId,
int indexCol,
DataValueDescriptor schemaIdOrderable)
Is the schema id referenced by the system table in question? |
boolean |
isSystemSchemaName(java.lang.String name)
Determine whether a string is the name of the system schema. |
void |
loadCatalogs(DataDescriptorGenerator ddg,
TabInfo[] catalogArray)
Initialize indices for an array of catalogs |
protected void |
loadDictionaryTables(TransactionController tc,
DataDescriptorGenerator ddg,
java.util.Properties startParams)
Initialize system catalogs. |
private SchemaDescriptor |
locateSchemaRow(java.lang.String schemaName,
TransactionController tc)
Get the target schema by searching for a matching row in SYSSCHEMAS by schema name. |
private SchemaDescriptor |
locateSchemaRow(UUID schemaId,
TransactionController tc)
Get the target schema by searching for a matching row in SYSSCHEMAS by schemaId. |
void |
makeCatalog(TabInfo ti,
SchemaDescriptor sd,
TransactionController tc)
The dirty work of creating a catalog. |
private ColumnDescriptor |
makeColumnDescriptor(SystemColumn column,
TableDescriptor td)
Converts a SystemColumn to a ColumnDescriptor. |
Cacheable |
newCacheable(CacheManager cm)
|
private SchemaDescriptor |
newDeclaredGlobalTemporaryTablesSchemaDesc(java.lang.String name)
|
private static java.util.List |
newSList()
|
private SchemaDescriptor |
newSystemSchemaDesc(java.lang.String name,
java.lang.String uuid)
|
protected void |
populateSYSDUMMY1(TransactionController tc)
Populate SYSDUMMY1 table with a single row. |
DataDictionaryContext |
pushDataDictionaryContext(ContextManager contextManager,
boolean nested)
Push a data dictionary context onto the current context manager. |
java.lang.Object |
run()
|
void |
setAutoincrementValue(TransactionController tc,
UUID tableUUID,
java.lang.String columnName,
long aiValue,
boolean incrementNeeded)
sets a new value in SYSCOLUMNS for a particular autoincrement column. |
private void |
setCacheMode(int newMode)
|
protected void |
setDependencyManager()
sets the dependencymanager associated with this dd. subclasses can override this to install their own funky dependency manager. |
(package private) void |
spsCacheEntryAdded(SPSDescriptor spsd)
Add an entry to the hashtables for lookup from the cache. |
(package private) void |
spsCacheEntryRemoved(SPSDescriptor spsd)
|
int |
startReading(LanguageConnectionContext lcc)
Inform this DataDictionary that we are about to start reading it. |
void |
startWriting(LanguageConnectionContext lcc)
Inform this DataDictionary that we are about to start writing to it. |
void |
stop()
Stop this module. |
void |
transactionFinished()
Inform this DataDictionary that the transaction in which writes have been done (or may have been done) has been committed or rolled back. |
private static java.lang.String |
twoDigits(int val)
|
private void |
updateColumnDescriptor(ColumnDescriptor cd,
UUID formerUUID,
java.lang.String formerName,
int[] colsToSet,
TransactionController tc,
boolean wait)
Update the column descriptor in question. |
void |
updateConglomerateDescriptor(ConglomerateDescriptor[] cds,
long conglomerateNumber,
TransactionController tc)
Update the conglomerateNumber for an array of ConglomerateDescriptors. |
void |
updateConglomerateDescriptor(ConglomerateDescriptor cd,
long conglomerateNumber,
TransactionController tc)
Update the conglomerateNumber for a ConglomerateDescriptor. |
void |
updateConstraintDescriptor(ConstraintDescriptor cd,
UUID formerUUID,
int[] colsToSet,
TransactionController tc)
Update the constraint descriptor in question. |
void |
updateLockGranularity(TableDescriptor td,
SchemaDescriptor schema,
char lockGranularity,
TransactionController tc)
Update the lockGranularity for the specified table. |
void |
updateSPS(SPSDescriptor spsd,
TransactionController tc,
boolean recompile,
boolean updateParamDescriptors,
boolean wait,
boolean firstCompilation)
Updates SYS.SYSSTATEMENTS with the info from the SPSD. |
void |
updateTriggerDescriptor(TriggerDescriptor triggerd,
UUID formerUUID,
int[] colsToSet,
TransactionController tc)
Update the trigger descriptor in question. |
void |
upgrade_addColumns(CatalogRowFactory rowFactory,
int[] newColumnIDs,
TransactionController tc)
Upgrade an existing catalog by adding columns. |
void |
upgrade_addInvisibleColumns(CatalogRowFactory rowFactory,
int[] newColumnIDs,
TransactionController tc)
Add invisible columns to an existing system catalog |
(package private) void |
upgrade_initSystemTableCols(TransactionController tc,
boolean isCoreTable,
int tableNum,
FormatableBitSet columnsToUpdateSet,
DataValueDescriptor[] replaceRow)
Initialize noncore columns to fixed values |
long |
upgrade_makeOneIndex(TransactionController tc,
TabInfo ti,
int indexNumber,
long heapConglomerateNumber)
Code to add an index to a catalog during upgrade. |
void |
upgrade_setNullability(CatalogRowFactory rowFactory,
int columnNumber,
boolean nullability,
TransactionController tc)
Upgrade an existing catalog by setting the nullability |
protected void |
upgradeMakeCatalog(TransactionController tc,
int catalogNumber)
called by the upgrade code (dd_xena etc) to add a new system catalog. |
private void |
widenConglomerate(ExecRow templateRow,
int[] newColumnIDs,
long conglomID,
TransactionController tc)
Adds columns to the conglomerate underlying a system table. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final java.lang.String CFG_SYSTABLES_ID
private static final java.lang.String CFG_SYSTABLES_INDEX1_ID
private static final java.lang.String CFG_SYSTABLES_INDEX2_ID
private static final java.lang.String CFG_SYSCOLUMNS_ID
private static final java.lang.String CFG_SYSCOLUMNS_INDEX1_ID
private static final java.lang.String CFG_SYSCOLUMNS_INDEX2_ID
private static final java.lang.String CFG_SYSCONGLOMERATES_ID
private static final java.lang.String CFG_SYSCONGLOMERATES_INDEX1_ID
private static final java.lang.String CFG_SYSCONGLOMERATES_INDEX2_ID
private static final java.lang.String CFG_SYSCONGLOMERATES_INDEX3_ID
private static final java.lang.String CFG_SYSSCHEMAS_ID
private static final java.lang.String CFG_SYSSCHEMAS_INDEX1_ID
private static final java.lang.String CFG_SYSSCHEMAS_INDEX2_ID
private static final int SYSCONGLOMERATES_CORE_NUM
private static final int SYSTABLES_CORE_NUM
private static final int SYSCOLUMNS_CORE_NUM
private static final int SYSSCHEMAS_CORE_NUM
private static final int NUM_CORE
private TabInfo[] coreInfo
protected SchemaDescriptor systemSchemaDesc
protected SchemaDescriptor sysIBMSchemaDesc
protected SchemaDescriptor declaredGlobalTemporaryTablesSchemaDesc
protected SchemaDescriptor systemDiagSchemaDesc
protected SchemaDescriptor systemUtilSchemaDesc
private java.lang.String systemSchemaName
private java.lang.String systemDiagSchemaName
private java.lang.String systemUtilSchemaName
private java.lang.String sysIBMSchemaName
private java.lang.String declaredGlobalTemporaryTablesSchemaName
boolean builtinSchemasAreFromLCC
protected boolean convertIdToLower
private static final int NUM_NONCORE
private static final java.lang.String[] nonCoreNames
private static final java.lang.String[] systemSchemaNames
This list should contain all schema's used by the system and are created when the database is created. Users should not be able to create or drop these schema's and should not be able to create or drop objects in these schema's. This list is used by code that needs to check if a particular schema is a "system" schema.
private DD_Version dictionaryVersion
private DD_Version softwareVersion
private TabInfo[] noncoreInfo
public DataDescriptorGenerator dataDescriptorGenerator
protected DataValueFactory dvf
protected AccessFactory af
private ExecutionFactory exFactory
protected UUIDFactory uuidFactory
java.util.Properties startupParameters
int engineType
protected boolean booting
private TransactionController bootingTC
protected DependencyManager dmgr
CacheManager OIDTdCache
CacheManager nameTdCache
private CacheManager spsNameCache
private java.util.Hashtable spsIdHash
int tdCacheSize
int stmtCacheSize
ShExLockable cacheCoordinator
public LockFactory lockFactory
volatile int cacheMode
volatile int ddlUsers
volatile int readersInDDLMode
public boolean readOnlyUpgrade
In 5.2 and newer this will be the case if the engine booting the database is newer than the engine that created it.
private int systemSQLNameNumber
private java.util.GregorianCalendar calendarForLastSystemSQLName
private long timeForLastSystemSQLName
private java.lang.String spsSet
| Constructor Detail |
public DataDictionaryImpl()
| Method Detail |
public boolean canSupport(java.util.Properties startParams)
canSupport in interface ModuleSupportable
public void boot(boolean create,
java.util.Properties startParams)
throws StandardException
boot in interface ModuleControlstartParams - The start-up parameters
StandardException - Thrown if the module fails to startMonitor,
ModuleFactoryprotected void setDependencyManager()
public DependencyManager getDependencyManager()
getDependencyManager in interface DataDictionaryDataDictionary.getDependencyManager()public void stop()
stop in interface ModuleControlMonitor,
ModuleFactorypublic Cacheable newCacheable(CacheManager cm)
newCacheable in interface CacheableFactory
public int startReading(LanguageConnectionContext lcc)
throws StandardException
DataDictionary
startReading in interface DataDictionarylcc - The LanguageConnectionContext to use.
StandardException - Thrown on errorDataDictionary.startReading(org.apache.derby.iapi.sql.conn.LanguageConnectionContext)
public void doneReading(int mode,
LanguageConnectionContext lcc)
throws StandardException
DataDictionary
doneReading in interface DataDictionarymode - The mode that was returned by startReading().lcc - The LanguageConnectionContext to use.
StandardException - Thrown on error
public void startWriting(LanguageConnectionContext lcc)
throws StandardException
DataDictionary
startWriting in interface DataDictionarylcc - The LanguageConnectionContext to use.
StandardException - Thrown on error
public void transactionFinished()
throws StandardException
DataDictionary
transactionFinished in interface DataDictionaryStandardException - Thrown on errorpublic int getCacheMode()
DataDictionary
getCacheMode in interface DataDictionaryprivate void setCacheMode(int newMode)
public DataDescriptorGenerator getDataDescriptorGenerator()
getDataDescriptorGenerator in interface DataDictionarypublic DataValueFactory getDataValueFactory()
getDataValueFactory in interface DataDictionarypublic ExecutionFactory getExecutionFactory()
getExecutionFactory in interface DataDictionary
public DataDictionaryContext pushDataDictionaryContext(ContextManager contextManager,
boolean nested)
DataDictionary
pushDataDictionaryContext in interface DataDictionarynested - true iff this is a nested data dictionary context.DataDictionary.pushDataDictionaryContext(org.apache.derby.iapi.services.context.ContextManager, boolean)
private void getBuiltinSchemaNames()
throws StandardException
StandardException
private void getBuiltinSchemas()
throws StandardException
StandardException
public SchemaDescriptor getSystemSchemaDescriptor()
throws StandardException
getSystemSchemaDescriptor in interface DataDictionaryStandardException - Thrown on failure
public SchemaDescriptor getSystemUtilSchemaDescriptor()
throws StandardException
StandardException - Thrown on failure
public SchemaDescriptor getSystemDiagSchemaDescriptor()
throws StandardException
getSystemDiagSchemaDescriptor in interface DataDictionaryStandardException - Thrown on failure
public SchemaDescriptor getSysIBMSchemaDescriptor()
throws StandardException
getSysIBMSchemaDescriptor in interface DataDictionaryStandardException - Thrown on failure
public SchemaDescriptor getDeclaredGlobalTemporaryTablesSchemaDescriptor()
throws StandardException
getDeclaredGlobalTemporaryTablesSchemaDescriptor in interface DataDictionaryStandardException - Thrown on failure
public boolean isSystemSchemaName(java.lang.String name)
throws StandardException
isSystemSchemaName in interface DataDictionaryname -
StandardException - Thrown on failure
public SchemaDescriptor getSchemaDescriptor(java.lang.String schemaName,
TransactionController tc,
boolean raiseError)
throws StandardException
getSchemaDescriptor in interface DataDictionaryschemaName - The name of the schema we're interested in. Must not be null.tc - TransactionControllerraiseError - whether an exception should be thrown if the schema does not exist.
StandardException - Thrown on error
private SchemaDescriptor locateSchemaRow(UUID schemaId,
TransactionController tc)
throws StandardException
schemaId - The id of the schema we're interested in.
If non-null, overrides schemaNametc - TransactionController. If null, one
is gotten off of the language connection context.
StandardException - Thrown on error
private SchemaDescriptor locateSchemaRow(java.lang.String schemaName,
TransactionController tc)
throws StandardException
schemaName - The name of the schema we're interested in.
If schemaId is null, used to qual.tc - TransactionController. If null, one
is gotten off of the language connection context.
StandardException - Thrown on error
public SchemaDescriptor getSchemaDescriptor(UUID schemaId,
TransactionController tc)
throws StandardException
getSchemaDescriptor in interface DataDictionaryschemaId - The id of the schema we're interested in.
If the name is NULL, get the descriptor for the
current schema.tc - TransactionController
StandardException - Thrown on error
public void addDescriptor(TupleDescriptor td,
TupleDescriptor parent,
int catalogNumber,
boolean duplicatesAllowed,
TransactionController tc)
throws StandardException
DataDictionary
addDescriptor in interface DataDictionarytd - descriptor to insert.parent - parent descriptor; e.g for a column parent is the
tabledescriptor to which the descriptor is beign inserted. for most other
objects it is the schema descriptor.catalogNumber - a value which identifies the catalog into which
the descriptor should be inserted. It is the users responsibility to
ensure that the catalogNumber is consistent with the tuple being
inserted.duplicatesAllowed - whether an exception should be thrown if the
insert results in a duplicate; if this parameter is FALSE then one
of the following exception will be thrown; LANG_OBJECT_ALREADY_EXISTS (if
parent is null) or LANG_OBJECT_ALREADY_EXISTS_IN_OBJECT (if parent is not
null). The error message is created by getting the name and type of the
tuple and parent.tc - the transaction controller to use to do all of this.
StandardExceptionDataDictionary.addDescriptor(org.apache.derby.iapi.sql.dictionary.TupleDescriptor, org.apache.derby.iapi.sql.dictionary.TupleDescriptor, int, boolean, org.apache.derby.iapi.store.access.TransactionController)
private void addDescriptorNow(TupleDescriptor td,
TupleDescriptor parent,
int catalogNumber,
boolean duplicatesAllowed,
TransactionController tc,
boolean wait)
throws StandardException
StandardException
private StandardException duplicateDescriptorException(TupleDescriptor tuple,
TupleDescriptor parent)
public void addDescriptorArray(TupleDescriptor[] td,
TupleDescriptor parent,
int catalogNumber,
boolean allowDuplicates,
TransactionController tc)
throws StandardException
addDescriptorArray in interface DataDictionaryStandardExceptionDataDictionary.addDescriptor(org.apache.derby.iapi.sql.dictionary.TupleDescriptor, org.apache.derby.iapi.sql.dictionary.TupleDescriptor, int, boolean, org.apache.derby.iapi.store.access.TransactionController)
public void dropSchemaDescriptor(java.lang.String schemaName,
TransactionController tc)
throws StandardException
dropSchemaDescriptor in interface DataDictionaryschemaName - The name of the schema to droptc - TransactionController for the transaction
StandardException - Thrown on error
public TableDescriptor getTableDescriptor(java.lang.String tableName,
SchemaDescriptor schema)
throws StandardException
getTableDescriptor in interface DataDictionarytableName - The name of the table to get the descriptor forschema - The descriptor for the schema the table lives in.
If null, use the system schema.
StandardException - Thrown on failure
private TableDescriptor getTableDescriptorIndex1Scan(java.lang.String tableName,
java.lang.String schemaUUID)
throws StandardException
StandardException - Thrown on failure
TableDescriptor getUncachedTableDescriptor(TableKey tableKey)
throws StandardException
tableKey - The TableKey of the table
StandardException - Thrown on failure
public TableDescriptor getTableDescriptor(UUID tableID)
throws StandardException
getTableDescriptor in interface DataDictionarytableID - The UUID of the table to get the descriptor for
StandardException - Thrown on failure
protected TableDescriptor getUncachedTableDescriptor(UUID tableID)
throws StandardException
tableID - The UUID of the table to get the descriptor for
StandardException - Thrown on failure
private TableDescriptor getTableDescriptorIndex2Scan(java.lang.String tableUUID)
throws StandardException
StandardException - Thrown on failure
private TableDescriptor finishTableDescriptor(TableDescriptor td)
throws StandardException
td - The TableDescriptor.
StandardException - Thrown on failure
public boolean isSchemaEmpty(SchemaDescriptor sd)
throws StandardException
isSchemaEmpty in interface DataDictionaryStandardException - on error
protected boolean isSchemaReferenced(TransactionController tc,
TabInfo ti,
int indexId,
int indexCol,
DataValueDescriptor schemaIdOrderable)
throws StandardException
tc - transaction controllerti - table info for the system tableindexId - index idindexCol - 1 based index columnschemaIdOrderable - the schemaid in a char orderable
StandardException - on error
public void dropTableDescriptor(TableDescriptor td,
SchemaDescriptor schema,
TransactionController tc)
throws StandardException
dropTableDescriptor in interface DataDictionaryschema - A descriptor for the schema the table
is a part of. If this parameter is
NULL, then the table is part of the
current (default) schematc - TransactionController for the transaction
StandardException - Thrown on error
public void updateLockGranularity(TableDescriptor td,
SchemaDescriptor schema,
char lockGranularity,
TransactionController tc)
throws StandardException
updateLockGranularity in interface DataDictionarytd - The TableDescriptor for the tableschema - The SchemaDescriptor for the tablelockGranularity - The new lockGranularitytc - The TransactionController to use.
StandardException - Thrown on error
public ColumnDescriptor getColumnDescriptorByDefaultId(UUID uuid)
throws StandardException
getColumnDescriptorByDefaultId in interface DataDictionaryuuid - The UUID of the default
StandardException - Thrown on failure
private void getColumnDescriptorsScan(TableDescriptor td)
throws StandardException
td - The TableDescriptor.
StandardException - Thrown on failure
private void getColumnDescriptorsScan(UUID uuid,
ColumnDescriptorList cdl,
TupleDescriptor td)
throws StandardException
uuid - The referencing UUIDtd - The parent tuple descriptor
StandardException - Thrown on failure
public void dropColumnDescriptor(UUID tableID,
java.lang.String columnName,
TransactionController tc)
throws StandardException
dropColumnDescriptor in interface DataDictionarytableID - The UUID of the table to drop the column fromcolumnName - The name of the column to droptc - TransactionController for the transaction
StandardException - Thrown on error
public void dropAllColumnDescriptors(UUID tableID,
TransactionController tc)
throws StandardException
dropAllColumnDescriptors in interface DataDictionarytableID - The UUID of the table from which to drop
all the column descriptorstc - TransactionController for the transaction
StandardException - Thrown on error
private void dropColumnDescriptorCore(TransactionController tc,
ExecIndexRow keyRow)
throws StandardException
tc - The TransactionControllerkeyRow - Start/stop position.
StandardException - Thrown on failure
private void updateColumnDescriptor(ColumnDescriptor cd,
UUID formerUUID,
java.lang.String formerName,
int[] colsToSet,
TransactionController tc,
boolean wait)
throws StandardException
cd - The ColumnDescriptorformerUUID - The UUID for this column in SYSCOLUMNS,
may differ from what is in cd if this
is the column that is being set.formerName - The name for this column in SYSCOLUMNS
may differ from what is in cd if this
is the column that is being set.colsToSet - Array of ints of columns to be modified,
1 based. May be null (all cols).tc - The TransactionController to usewait - If true, then the caller wants to wait for locks. False will be
when we using a nested user xaction - we want to timeout right away if the parent
holds the lock. (bug 4821)
StandardException - Thrown on failure
public ViewDescriptor getViewDescriptor(UUID uuid)
throws StandardException
getViewDescriptor in interface DataDictionaryuuid - The UUID for the view
StandardException - Thrown on error
public ViewDescriptor getViewDescriptor(TableDescriptor td)
throws StandardException
getViewDescriptor in interface DataDictionarytd - The TableDescriptor for the view.
StandardException - Thrown on error
private ViewDescriptor getViewDescriptorScan(TableDescriptor tdi)
throws StandardException
tdi - The TableDescriptor for the view.
StandardException - Thrown on error
public void dropViewDescriptor(ViewDescriptor vd,
TransactionController tc)
throws StandardException
dropViewDescriptor in interface DataDictionaryvd - A descriptor for the view to be droppedtc - TransactionController to use
StandardException - Thrown on error
private FileInfoDescriptor getFileInfoDescriptorIndex2Scan(UUID id)
throws StandardException
StandardException - Thrown on failure
public FileInfoDescriptor getFileInfoDescriptor(UUID id)
throws StandardException
DataDictionary
getFileInfoDescriptor in interface DataDictionaryid - The descriptor's id.
StandardException - Thrown on failureDataDictionary.getFileInfoDescriptor(org.apache.derby.catalog.UUID)
private FileInfoDescriptor getFileInfoDescriptorIndex1Scan(UUID schemaId,
java.lang.String name)
throws StandardException
StandardException - Thrown on failure
public FileInfoDescriptor getFileInfoDescriptor(SchemaDescriptor sd,
java.lang.String name)
throws StandardException
DataDictionary
getFileInfoDescriptor in interface DataDictionarysd - the schema that holds the FileInfoDescriptor.
StandardException - Thrown on failureDataDictionary.getFileInfoDescriptor(org.apache.derby.catalog.UUID)
public void dropFileInfoDescriptor(FileInfoDescriptor fid)
throws StandardException
DataDictionary
dropFileInfoDescriptor in interface DataDictionaryStandardException - Thrown on errorDataDictionary.dropFileInfoDescriptor(org.apache.derby.iapi.sql.dictionary.FileInfoDescriptor)
public SPSDescriptor getSPSDescriptor(UUID uuid)
throws StandardException
getSPSDescriptor in interface DataDictionaryuuid - The UUID
StandardException - Thrown on failurevoid spsCacheEntryAdded(SPSDescriptor spsd)
void spsCacheEntryRemoved(SPSDescriptor spsd)
public SPSDescriptor getUncachedSPSDescriptor(TableKey stmtKey)
throws StandardException
stmtKey - The TableKey of the sps
StandardException - Thrown on failure
protected SPSDescriptor getUncachedSPSDescriptor(UUID stmtId)
throws StandardException
stmtId - The UUID of the stmt to get the descriptor for
StandardException - Thrown on failure
private SPSDescriptor getSPSDescriptorIndex2Scan(java.lang.String stmtUUID)
throws StandardException
StandardException - Thrown on failure
public SPSDescriptor getSPSDescriptor(java.lang.String stmtName,
SchemaDescriptor sd)
throws StandardException
getSPSDescriptor in interface DataDictionarystmtName - the statement namesd - The SchemaDescriptor
StandardException - Thrown on failure
private SPSDescriptor getSPSDescriptorIndex1Scan(java.lang.String stmtName,
java.lang.String schemaUUID)
throws StandardException
StandardException - Thrown on failure
public void addSPSDescriptor(SPSDescriptor descriptor,
TransactionController tc,
boolean wait)
throws StandardException
addSPSDescriptor in interface DataDictionarydescriptor - The descriptor to addtc - The transaction controllerwait - To wait for lock or not
StandardException - Thrown on error
private void addSPSParams(SPSDescriptor spsd,
TransactionController tc,
boolean wait)
throws StandardException
StandardException
public DataTypeDescriptor[] getSPSParams(SPSDescriptor spsd,
java.util.Vector defaults)
throws StandardException
getSPSParams in interface DataDictionaryspsd - sps descriptordefaults - vector for storing column defaults
StandardException - Thrown on error
public void updateSPS(SPSDescriptor spsd,
TransactionController tc,
boolean recompile,
boolean updateParamDescriptors,
boolean wait,
boolean firstCompilation)
throws StandardException
updateSPS in interface DataDictionarytc - The transaction controllerupdateParamDescriptors - If true, will update the
parameter descriptors in SYS.SYSCOLUMNS.wait - If true, then the caller wants to wait for locks. False will befirstCompilation - true, if Statement is getting compiled for first
time and SPS was created with NOCOMPILE option.
when we using a nested user xaction - we want to timeout right away if the parent
holds the lock. (bug 4821)recompile - whether to recompile or invalidate
StandardException - Thrown on error
public void invalidateAllSPSPlans()
throws StandardException
DataDictionary
invalidateAllSPSPlans in interface DataDictionaryStandardException - Thrown on errorDataDictionary.invalidateAllSPSPlans()
void clearSPSPlans()
throws StandardException
StandardException - Thrown on error
public void dropSPSDescriptor(SPSDescriptor descriptor,
TransactionController tc)
throws StandardException
dropSPSDescriptor in interface DataDictionarydescriptor - The descriptor to droptc - The TransactionController.
StandardException - Thrown on failure
public void dropSPSDescriptor(UUID uuid,
TransactionController tc)
throws StandardException
dropSPSDescriptor in interface DataDictionaryuuid - the statement uuidtc - The TransactionController.
StandardException - Thrown on failure
public java.util.List getAllSPSDescriptors()
throws StandardException
getAllSPSDescriptors in interface DataDictionaryStandardException - Thrown on failure
private ConstraintDescriptorList getAllConstraintDescriptors()
throws StandardException
StandardException - Thrown on failure
private GenericDescriptorList getAllTriggerDescriptors()
throws StandardException
StandardException - Thrown on failure
public TriggerDescriptor getTriggerDescriptor(UUID uuid)
throws StandardException
getTriggerDescriptor in interface DataDictionaryuuid - The UUID
StandardException - Thrown on failure
public TriggerDescriptor getTriggerDescriptor(java.lang.String name,
SchemaDescriptor sd)
throws StandardException
getTriggerDescriptor in interface DataDictionaryname - The sps name.sd - The schema descriptor.
StandardException - Thrown on failure
public GenericDescriptorList getTriggerDescriptors(TableDescriptor td)
throws StandardException
getTriggerDescriptors in interface DataDictionaryStandardException - Thrown on failure
private void getTriggerDescriptorsScan(TableDescriptor td,
boolean forUpdate)
throws StandardException
td - The TableDescriptor.forUpdate - Whether or not to open scan for update
StandardException - Thrown on failure
public void dropTriggerDescriptor(TriggerDescriptor descriptor,
TransactionController tc)
throws StandardException
dropTriggerDescriptor in interface DataDictionarydescriptor - The descriptor to droptc - The TransactionController.
StandardException - Thrown on failure
public void updateTriggerDescriptor(TriggerDescriptor triggerd,
UUID formerUUID,
int[] colsToSet,
TransactionController tc)
throws StandardException
updateTriggerDescriptor in interface DataDictionarytriggerd - The Trigger descriptorformerUUID - The UUID for this column in SYSTRIGGERS,
may differ from what is in triggerd if this
is the column that is being set.colsToSet - Array of ints of columns to be modified,
1 based. May be null (all cols).tc - The TransactionController to use
StandardException - Thrown on failure
public ConstraintDescriptor getConstraintDescriptor(UUID uuid)
throws StandardException
getConstraintDescriptor in interface DataDictionaryuuid - The UUID
StandardException - Thrown on failure
public ConstraintDescriptor getConstraintDescriptor(java.lang.String constraintName,
UUID schemaID)
throws StandardException
getConstraintDescriptor in interface DataDictionaryconstraintName - Constraint name.schemaID - The schema UUID
StandardException - Thrown on failure
public java.util.List getStatisticsDescriptors(TableDescriptor td)
throws StandardException
getStatisticsDescriptors in interface DataDictionarytd - Table Descriptor for which I need statistics
StandardException
public ConstraintDescriptorList getConstraintDescriptors(TableDescriptor td)
throws StandardException
getConstraintDescriptors in interface DataDictionaryStandardException - Thrown on failure
public ConstraintDescriptorList getActiveConstraintDescriptors(ConstraintDescriptorList cdl)
throws StandardException
getActiveConstraintDescriptors in interface DataDictionarycdl - The constraint descriptor list to wrap with
an Active constraint descriptor list.
StandardException - Thrown on failure
public boolean activeConstraint(ConstraintDescriptor constraint)
throws StandardException
activeConstraint in interface DataDictionaryconstraint - the constraint to check
StandardException - Thrown on failure
public ConstraintDescriptor getConstraintDescriptor(TableDescriptor td,
UUID uuid)
throws StandardException
getConstraintDescriptor in interface DataDictionaryuuid - the UUID for the backing index.
StandardException - Thrown on failure
public ConstraintDescriptor getConstraintDescriptorById(TableDescriptor td,
UUID uuid)
throws StandardException
getConstraintDescriptorById in interface DataDictionaryuuid - The UUID for the constraint
StandardException - Thrown on failure
public ConstraintDescriptor getConstraintDescriptorByName(TableDescriptor td,
SchemaDescriptor sd,
java.lang.String constraintName,
boolean forUpdate)
throws StandardException
getConstraintDescriptorByName in interface DataDictionarysd - The schema descriptor for the constraintconstraintName - The constraint name.forUpdate - Whether or not access is for update
StandardException - Thrown on failure
private void getConstraintDescriptorsScan(TableDescriptor td,
boolean forUpdate)
throws StandardException
td - The TableDescriptor.forUpdate - Whether or not to open scan for update
StandardException - Thrown on failure
protected ConstraintDescriptor getConstraintDescriptorViaIndex(int indexId,
ExecIndexRow keyRow,
TabInfo ti,
TableDescriptor td,
ConstraintDescriptorList dList,
boolean forUpdate)
throws StandardException
indexId - The id of the index (0 to # of indexes on table) to usekeyRow - The supplied ExecIndexRow for searchti - The TabInfo to usetd - The TableDescriptor, if supplied.dList - The list to build, if supplied. If null, then caller expects
a single descriptorforUpdate - Whether or not to open scan for update
StandardException - Thrown on error
protected TupleDescriptor getConstraintDescriptorViaHeap(ScanQualifier[][] scanQualifiers,
TabInfo ti,
TupleDescriptor parentTupleDescriptor,
java.util.List list)
throws StandardException
scanQualifiers - qualifiersti - The TabInfo to useparentTupleDescriptor - The parentDescriptor, if applicable.
StandardException - Thrown on error
public TableDescriptor getConstraintTableDescriptor(UUID constraintId)
throws StandardException
getConstraintTableDescriptor in interface DataDictionaryconstraintId - The id of the constraint
StandardException - Thrown on error
public ConstraintDescriptorList getForeignKeys(UUID constraintId)
throws StandardException
getForeignKeys in interface DataDictionaryconstraintId - The id of the referenced constraint
StandardException - Thrown on error
public java.util.List getConstraints(UUID uuid,
int indexId,
int columnNum)
throws StandardException
indexId - The index id in SYS.SYSCONSTRAINTScolumnNum - The column to retrieve
StandardException - Thrown on error
public void addConstraintDescriptor(ConstraintDescriptor descriptor,
TransactionController tc)
throws StandardException
addConstraintDescriptor in interface DataDictionarydescriptor - The descriptor to addtc - The transaction controller
StandardException - Thrown on error
public void updateConstraintDescriptor(ConstraintDescriptor cd,
UUID formerUUID,
int[] colsToSet,
TransactionController tc)
throws StandardException
updateConstraintDescriptor in interface DataDictionarycd - The ConstraintescriptorformerUUID - The UUID for this column in SYSCONSTRAINTS,
may differ from what is in cd if this
is the column that is being set.colsToSet - Array of ints of columns to be modified,
1 based. May be null (all cols).tc - The TransactionController to use
StandardException - Thrown on failure
public void dropConstraintDescriptor(TableDescriptor table,
ConstraintDescriptor descriptor,
TransactionController tc)
throws StandardException
dropConstraintDescriptor in interface DataDictionarytable - The table from which to drop the
constraint descriptordescriptor - The descriptor to droptc - The TransactionController
StandardException - Thrown on error
public void dropAllConstraintDescriptors(TableDescriptor table,
TransactionController tc)
throws StandardException
dropAllConstraintDescriptors in interface DataDictionarytable - The table from which to drop all
constraint descriptorstc - The TransactionController
StandardException - Thrown on error
public SubKeyConstraintDescriptor getSubKeyConstraint(UUID constraintId,
int type)
throws StandardException
getSubKeyConstraint in interface DataDictionaryconstraintId - The UUID for the constraint.type - The type of the constraint
(e.g. DataDictionary.FOREIGNKEY_CONSTRAINT)
StandardException - Thrown on failure
private void addSubKeyConstraint(KeyConstraintDescriptor descriptor,
TransactionController tc)
throws StandardException
descriptor - The KeyConstraintDescriptor for the constraint.tc - The TransactionController
StandardException - Thrown on failure
private void dropSubKeyConstraint(ConstraintDescriptor constraint,
TransactionController tc)
throws StandardException
constraint - the constrainttc - The TransactionController
StandardException - Thrown on failure
private SubCheckConstraintDescriptor getSubCheckConstraint(UUID constraintId)
throws StandardException
constraintId - The UUID for the constraint.
StandardException - Thrown on failure
private void dropSubCheckConstraint(UUID constraintId,
TransactionController tc)
throws StandardException
constraintId - The constraint id.tc - The TransactionController
StandardException - Thrown on failure
public java.util.Hashtable hashAllConglomerateDescriptorsByNumber(TransactionController tc)
throws StandardException
hashAllConglomerateDescriptorsByNumber in interface DataDictionarytc - TransactionController for the transaction
StandardException - Thrown on failure
public java.util.Hashtable hashAllTableDescriptorsByTableId(TransactionController tc)
throws StandardException
hashAllTableDescriptorsByTableId in interface DataDictionarytc - TransactionController for the transaction
StandardException - Thrown on failure
public ConglomerateDescriptor getConglomerateDescriptor(UUID uuid)
throws StandardException
getConglomerateDescriptor in interface DataDictionaryuuid - The UUID
StandardException - Thrown on failure
public ConglomerateDescriptor[] getConglomerateDescriptors(UUID uuid)
throws StandardException
getConglomerateDescriptors in interface DataDictionaryuuid - The UUID
StandardException - Thrown on failure
public ConglomerateDescriptor getConglomerateDescriptor(long conglomerateNumber)
throws StandardException
getConglomerateDescriptor in interface DataDictionaryconglomerateNumber - The conglomerate number.
StandardException - Thrown on failure
public ConglomerateDescriptor[] getConglomerateDescriptors(long conglomerateNumber)
throws StandardException
getConglomerateDescriptors in interface DataDictionaryconglomerateNumber - The number for the conglomerate
we're interested in
StandardException - Thrown on failure
private void getConglomerateDescriptorsScan(TableDescriptor td)
throws StandardException
td - The TableDescriptor.
StandardException - Thrown on failure
public ConglomerateDescriptor getConglomerateDescriptor(java.lang.String indexName,
SchemaDescriptor sd,
boolean forUpdate)
throws StandardException
getConglomerateDescriptor in interface DataDictionaryindexName - The name of the index we're looking forsd - The schema descriptorforUpdate - Whether or not to get an exclusive row
lock on the row in sys.sysconglomerates.
StandardException - Thrown on failure
public void dropConglomerateDescriptor(ConglomerateDescriptor conglomerate,
TransactionController tc)
throws StandardException
dropConglomerateDescriptor in interface DataDictionaryconglomerate - The ConglomerateDescriptor for the conglomeratetc - TransactionController for the transaction
StandardException - Thrown on failure
public void dropAllConglomerateDescriptors(TableDescriptor td,
TransactionController tc)
throws StandardException
dropAllConglomerateDescriptors in interface DataDictionarytd - The TableDescriptor of the tabletc - TransactionController for the transaction
StandardException - Thrown on failure
public void updateConglomerateDescriptor(ConglomerateDescriptor cd,
long conglomerateNumber,
TransactionController tc)
throws StandardException
updateConglomerateDescriptor in interface DataDictionarycd - The ConglomerateDescriptorconglomerateNumber - The new conglomerate numbertc - The TransactionController to use
StandardException - Thrown on failure
public void updateConglomerateDescriptor(ConglomerateDescriptor[] cds,
long conglomerateNumber,
TransactionController tc)
throws StandardException
updateConglomerateDescriptor in interface DataDictionarycds - The array of ConglomerateDescriptorsconglomerateNumber - The new conglomerate numbertc - The TransactionController to use
StandardException - Thrown on failure
public java.util.List getDependentsDescriptorList(java.lang.String dependentID)
throws StandardException
getDependentsDescriptorList in interface DataDictionarydependentID - The ID of the dependent we're interested in
StandardException - Thrown on failure
public java.util.List getProvidersDescriptorList(java.lang.String providerID)
throws StandardException
getProvidersDescriptorList in interface DataDictionaryStandardException - Thrown on failure
public java.util.List getAllDependencyDescriptorsList()
throws StandardException
getAllDependencyDescriptorsList in interface DataDictionaryStandardException - Thrown on failure
public void dropStoredDependency(DependencyDescriptor dd,
TransactionController tc)
throws StandardException
dropStoredDependency in interface DataDictionarydd - The DependencyDescriptor.tc - TransactionController for the transaction
StandardException - Thrown on failure
public void dropDependentsStoredDependencies(UUID dependentsUUID,
TransactionController tc)
throws StandardException
dropDependentsStoredDependencies in interface DataDictionarydependentsUUID - Dependent's uuidtc - TransactionController for the transaction
StandardException - Thrown on failurepublic UUIDFactory getUUIDFactory()
getUUIDFactory in interface DataDictionary
public AliasDescriptor getAliasDescriptor(UUID uuid)
throws StandardException
getAliasDescriptor in interface DataDictionaryuuid - The UUID
StandardException - Thrown on failure
public AliasDescriptor getAliasDescriptor(java.lang.String schemaId,
java.lang.String aliasName,
char nameSpace)
throws StandardException
getAliasDescriptor in interface DataDictionaryschemaId - schema identifieraliasName - The alias name.nameSpace - The alias type.
StandardException - Thrown on failure
public java.util.List getRoutineList(java.lang.String schemaID,
java.lang.String routineName,
char nameSpace)
throws StandardException
getRoutineList in interface DataDictionaryStandardException
public void dropAliasDescriptor(AliasDescriptor ad,
TransactionController tc)
throws StandardException
dropAliasDescriptor in interface DataDictionaryad - The AliasDescriptor to droptc - The TransactionController
StandardException - Thrown on failure
protected void loadDictionaryTables(TransactionController tc,
DataDescriptorGenerator ddg,
java.util.Properties startParams)
throws StandardException
tc - TransactionControllerddg - DataDescriptorGenerator
StandardException - Thrown on error
public void loadCatalogs(DataDescriptorGenerator ddg,
TabInfo[] catalogArray)
throws StandardException
ddg - DataDescriptorGenerator
StandardException - Thrown on error
protected void createDictionaryTables(java.util.Properties params,
TransactionController tc,
DataDescriptorGenerator ddg)
throws StandardException
protected Configuration createDictionaryTables(Configuration cfg, TransactionController tc,
DataDescriptorGenerator ddg)
throws StandardException
{
super.createDictionaryTables(params, tc, ddg);
...
}
StandardException - Standard Cloudscape error policy
private SchemaDescriptor addSystemSchema(java.lang.String schema_name,
java.lang.String schema_uuid,
TransactionController tc)
throws StandardException
schema_name - name of the schema to add.
StandardException - Standard exception policy.
protected void upgradeMakeCatalog(TransactionController tc,
int catalogNumber)
throws StandardException
tc - TransactionController to use.catalogNumber - catalogNumber
StandardException
public void makeCatalog(TabInfo ti,
SchemaDescriptor sd,
TransactionController tc)
throws StandardException
ti - TabInfo describing catalog to create.sd - Schema to create catalogs in.tc - Transaction context.
StandardException - Standard Cloudscape error policy
public void upgrade_setNullability(CatalogRowFactory rowFactory,
int columnNumber,
boolean nullability,
TransactionController tc)
throws StandardException
columnNumber - The column to changenullability - true if nullabletc - Transaction controller
StandardException - Standard Cloudscape error policy
public void upgrade_addColumns(CatalogRowFactory rowFactory,
int[] newColumnIDs,
TransactionController tc)
throws StandardException
rowFactory - Associated with this catalog.newColumnIDs - Array of 1-based column ids.tc - Transaction controller
StandardException - Standard Cloudscape error policy
public void upgrade_addInvisibleColumns(CatalogRowFactory rowFactory,
int[] newColumnIDs,
TransactionController tc)
throws StandardException
rowFactory - Associated with this catalog.newColumnIDs - Array of 1-based column ids.tc - Transaction controller
StandardException - Standard Cloudscape error policy
private void widenConglomerate(ExecRow templateRow,
int[] newColumnIDs,
long conglomID,
TransactionController tc)
throws StandardException
templateRow - Ultimate shape of base row of tablenewColumnIDs - Array of 1-based column idsconglomID - heap idtc - Transaction controller
StandardException - Standard Cloudscape error policy
public long upgrade_makeOneIndex(TransactionController tc,
TabInfo ti,
int indexNumber,
long heapConglomerateNumber)
throws StandardException
tc - transaction controllerti - information on the catalog that's having a new index addedindexNumber - 0-based index numberheapConglomerateNumber - what it is
StandardException - Thrown on failure
private UUID getUUIDForCoreTable(java.lang.String tableName,
java.lang.String schemaUUID,
TransactionController tc)
throws StandardException
tableName - Name of the tableschemaUUID - UUID of schematc - TransactionController to user
StandardException - Thrown on failure
void upgrade_initSystemTableCols(TransactionController tc,
boolean isCoreTable,
int tableNum,
FormatableBitSet columnsToUpdateSet,
DataValueDescriptor[] replaceRow)
throws StandardException
tc - The TransactionController for the transaction to do the
upgrade in.isCoreTable - true if it is a core tabletableNum - the noncore table numbercolumnsToUpdateSet - a bit set of columns to update. ZERO BASEDreplaceRow - an object array of Orderables for the new values
StandardException - Thrown on error
private void bootStrapSystemIndexes(SchemaDescriptor sd,
TransactionController tc,
DataDescriptorGenerator ddg,
TabInfo ti)
throws StandardException
StandardException - Standard Cloudscape error policy
public RowLocation[] computeAutoincRowLocations(TransactionController tc,
TableDescriptor td)
throws StandardException
DataDictionary
computeAutoincRowLocations in interface DataDictionarytc - TransactionControler to use to compute the row location.td - TableDescriptor
StandardExceptionDataDictionary.computeAutoincRowLocations(org.apache.derby.iapi.store.access.TransactionController, org.apache.derby.iapi.sql.dictionary.TableDescriptor)
public NumberDataValue getSetAutoincrementValue(RowLocation rl,
TransactionController tc,
boolean doUpdate,
NumberDataValue newValue,
boolean wait)
throws StandardException
DataDictionary
getSetAutoincrementValue in interface DataDictionaryrl - RowLocation of the entry in SYSCOLUMNS.tc - TransactionController to use.doUpdate - Write the new value to disk if TRUE.newValue - A NumberDataValue to use to return incremented value. If
null, then the caller simply wants the current value fromd disk.wait - If true, then the caller wants to wait for locks. When
using a nested user xaction we want to timeout right away if the parent
holds the lock.
StandardExceptionDataDictionary.getSetAutoincrementValue(org.apache.derby.iapi.types.RowLocation, org.apache.derby.iapi.store.access.TransactionController, boolean, org.apache.derby.iapi.types.NumberDataValue, boolean)
private ConglomerateDescriptor bootstrapOneIndex(SchemaDescriptor sd,
TransactionController tc,
DataDescriptorGenerator ddg,
TabInfo ti,
int indexNumber,
long heapConglomerateNumber)
throws StandardException
StandardException
public void initSystemIndexVariables(DataDescriptorGenerator ddg,
TabInfo ti,
int indexNumber)
throws StandardException
StandardException
protected void populateSYSDUMMY1(TransactionController tc)
throws StandardException
StandardException - Standard Cloudscape error policy
public void clearCaches()
throws StandardException
clearCaches in interface DataDictionaryStandardException - Standard Cloudscape error policy
private void addSystemTableToDictionary(TabInfo ti,
SchemaDescriptor sd,
TransactionController tc,
DataDescriptorGenerator ddg)
throws StandardException
StandardException
private ColumnDescriptor makeColumnDescriptor(SystemColumn column,
TableDescriptor td)
throws StandardException
column - a SystemColumntd - descriptor for table that column lives in
StandardException - Standard Cloudscape error policy
private long createConglomerate(java.lang.String name,
TransactionController tc,
ExecRow rowTemplate,
java.util.Properties properties)
throws StandardException
name - Name of new catalog.tc - Transaction context.rowTemplate - Template for rows for the new tableproperties - Properties for createConglomerate
StandardException - Standard Cloudscape error policy.
public DataValueDescriptor getValueAsDVD(UUID uuid)
throws StandardException
StandardException - Thrown on error
public void initializeCatalogInfo()
throws StandardException
StandardException - Thrown on error
private void initializeCoreInfo()
throws StandardException
StandardException
private void initializeNoncoreInfo()
throws StandardException
StandardException
public TabInfo getTabInfo(java.lang.String tableName)
throws StandardException
getTabInfo in interface DataDictionarytableName - name of table to get the TabInfo for.
StandardException - Thrown on error
public TransactionController getTransactionCompile()
throws StandardException
StandardException - Thrown on error
public TransactionController getTransactionExecute()
throws StandardException
StandardException - Thrown on error
private final TupleDescriptor getDescriptorViaIndex(int indexId,
ExecIndexRow keyRow,
ScanQualifier[][] scanQualifiers,
TabInfo ti,
TupleDescriptor parentTupleDescriptor,
java.util.List list,
boolean forUpdate)
throws StandardException
indexId - The id of the index (0 to # of indexes on table) to usekeyRow - The supplied ExecIndexRow for searchti - The TabInfo to useparentTupleDescriptor - The parentDescriptor, if applicable.forUpdate - Whether or not to open the index for update.
StandardException - Thrown on error
private void debugGenerateInfo(java.lang.StringBuffer strbuf,
TransactionController tc,
ConglomerateController heapCC,
TabInfo ti,
int indexId)
protected TupleDescriptor getDescriptorViaHeap(ScanQualifier[][] scanQualifiers,
TabInfo ti,
TupleDescriptor parentTupleDescriptor,
java.util.List list)
throws StandardException
scanQualifiers - qualifiersti - The TabInfo to useparentTupleDescriptor - The parentDescriptor, if applicable.
StandardException - Thrown on error
private TabInfo getNonCoreTI(int catalogNumber)
throws StandardException
StandardException - Thrown on error
protected TabInfo getNonCoreTIByNumber(int catalogNumber)
throws StandardException
StandardException
protected void initSystemIndexVariables(TabInfo ti)
throws StandardException
StandardExceptionprivate void clearNoncoreTable(int nonCoreNum)
public TabInfo getCoreCatalog(int coreNum)
throws StandardException
getCoreCatalog in interface DataDictionarycoreNum - The index into coreInfo[].
StandardException - Thrown on error
public void faultInTabInfo(TabInfo ti)
throws StandardException
ti - TabInfo to fault in.
StandardException - Thrown on error
public static ExecIndexRow getIndexRowFromHeapRow(IndexRowGenerator irg,
RowLocation rl,
ExecRow heapRow)
throws StandardException
irg - IndexRowGenerator to userl - RowLocation for heapheapRow - Row from the heap
StandardException - Thrown on errorpublic int getEngineType()
getEngineType in interface DataDictionarypublic long getSYSCOLUMNSHeapConglomerateNumber()
void addSYSCOLUMNSIndex2Property(TransactionController tc,
long index2ConglomerateNumber)
private long getBootParameter(java.util.Properties startParams,
java.lang.String key,
boolean required)
throws StandardException
StandardExceptionpublic java.lang.String getSystemSQLName()
getSystemSQLName in interface DataDictionaryprivate static java.lang.String twoDigits(int val)
public void setAutoincrementValue(TransactionController tc,
UUID tableUUID,
java.lang.String columnName,
long aiValue,
boolean incrementNeeded)
throws StandardException
setAutoincrementValue in interface DataDictionarytc - Transaction Controller to use.columnName - Name of the column.aiValue - Value to write to SYSCOLUMNS.incrementNeeded - whether to increment the value passed in by the
user (aiValue) or not before writing it to SYSCOLUMNS.
StandardException
private RowLocation computeRowLocation(TransactionController tc,
TableDescriptor td,
java.lang.String columnName)
throws StandardException
tc - Transaction Controller to use.td - Table Descriptor.columnName - Name of column which has autoincrement column.
StandardException - thrown on failure.
public RowLocation getRowLocationTemplate(LanguageConnectionContext lcc,
TableDescriptor td)
throws StandardException
getRowLocationTemplate in interface DataDictionaryStandardException
public void addTableDescriptorToOtherCache(TableDescriptor td,
Cacheable c)
throws StandardException
td - TableDescriptor to add to the other cache.c - Cacheable Object which lets us figure out the other cache.
StandardException
public void dropStatisticsDescriptors(UUID tableUUID,
UUID referenceUUID,
TransactionController tc)
throws StandardException
DataDictionary
dropStatisticsDescriptors in interface DataDictionarytableUUID - UUID of the tablereferenceUUID - UUID of the index. This can be null.tc - Transcation Controller to use.
StandardExceptionDataDictionary.dropStatisticsDescriptors(org.apache.derby.catalog.UUID, org.apache.derby.catalog.UUID, org.apache.derby.iapi.store.access.TransactionController)private static LanguageConnectionContext getLCC()
private SchemaDescriptor newSystemSchemaDesc(java.lang.String name,
java.lang.String uuid)
private SchemaDescriptor newDeclaredGlobalTemporaryTablesSchemaDesc(java.lang.String name)
public boolean checkVersion(int requiredMajorVersion,
java.lang.String feature)
throws StandardException
checkVersion in interface DataDictionaryfeature - Non-null to throw an error, null to return the state of the version match.requiredMajorVersion - Data Dictionary major version (DataDictionary.DD_ constant)
StandardException
void createSystemSps(TransactionController tc)
throws StandardException
StandardException
private void createSPSSet(TransactionController tc,
boolean net,
UUID schemaID)
throws StandardException
StandardException
private final void createSystemProcedureOrFunction(java.lang.String routine_name,
UUID schema_uuid,
java.lang.String[] arg_names,
TypeDescriptor[] arg_types,
int num_out_param,
int num_result_sets,
short routine_sql_control,
TypeDescriptor return_type,
TransactionController tc)
throws StandardException
Takes the input procedure and inserts it into the appropriate catalog. Assumes all arguments are "IN" type.
routine_name - name of the routine in java and the SQL
procedure name.arg_names - String array of procedure argument names in order.arg_types - Internal SQL types of the argumentsroutine_sql_control - One of the RoutineAliasInfo constants:
MODIFIES_SQL_DATA
READS_SQL_DATA
CONTAINS_SQL
NO_SQLreturn_type - null for procedure. For functions the return type
of the function.
StandardException - Standard exception policy.
private final void create_SYSCS_procedures(TransactionController tc)
throws StandardException
Used to add the system procedures to the database when it is created. System procedures are currently added to either SYSCS_UTIL or SQLJ schemas.
tc - transaction controller to use. Counts on caller to
commit.
StandardException - Standard exception policy.
protected final void create_SYSIBM_procedures(TransactionController tc)
throws StandardException
Used to add the system procedures to the database when it is created. Full upgrade from version 5.1 or earlier also calls this method.
tc - transaction controller to use. Counts on caller to
commit.
StandardException - Standard exception policy.
void create_10_1_system_procedures(TransactionController tc,
UUID sysUtilUUID)
throws StandardException
Create 10.1 system procedures, called by either code creating new database, or code doing hard upgrade from previous version.
sysUtilUUID - uuid of the SYSUTIL schema.
StandardException - Standard exception policy.private final java.util.Properties getQueryDescriptions(boolean net)
public final java.lang.Object run()
run in interface java.security.PrivilegedActionprivate static java.util.List newSList()
|
Built on Tue 2006-10-10 19:23:47+0200, from revision exported | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||