|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The DataDictionary interface is used with the data dictionary to get descriptors for binding and compilation. Some descriptors (such as table and column descriptors) are added to and deleted from the data dictionary by other modules (like the object store). Other descriptors are added and deleted by the language module itself (e.g. the language module adds and deletes views, because views are too high-level for modules like the object store to know about).
Field Summary | |
static int |
CHECK_CONSTRAINT
|
static int |
COMPILE_ONLY_MODE
Modes returned from startReading() |
static java.lang.String |
CORE_DATA_DICTIONARY_VERSION
DataDictionaryVersion property indicates the updgrade level of the system catalogs. |
static java.lang.String |
CREATE_DATA_DICTIONARY_VERSION
CreateDataDictionaryVersion property indicates the level of the system catalogs, at the time of database creation. |
static java.lang.String |
DATABASE_ID
|
static int |
DD_VERSION_CS_10_0
Cloudscape/Derby 10.0 (Gandalf) System Catalog version |
static int |
DD_VERSION_CS_5_0
Cloudscape 5.0 System Catalog version |
static int |
DD_VERSION_CS_5_1
Cloudscape 5.1 (Arwen) System Catalog version |
static int |
DD_VERSION_CS_5_2
Cloudscape 5.2 (Frodo) System Catalog version |
static int |
DD_VERSION_CS_8_1
Cloudscape 8.1 (Pre-Gandalf) System Catalog version |
static int |
DD_VERSION_CURRENT
Special version indicating the database must be upgraded to or created at the current engine level |
static int |
DD_VERSION_DERBY_10_1
Derby 10.1 System Catalog version |
static int |
DDL_MODE
|
static int |
DROP_CONSTRAINT
|
static int |
FOREIGNKEY_CONSTRAINT
|
static java.lang.String |
MODULE
|
static int |
NOTNULL_CONSTRAINT
|
static int |
PRIMARYKEY_CONSTRAINT
|
static java.lang.String |
PROPERTY_CONGLOMERATE_VERSION
|
static java.lang.String |
SOFT_DATA_DICTIONARY_VERSION
derby.softDataDictionaryVersion property indicates the soft upgrade level of the system catalogs. |
static int |
SYSALIASES_CATALOG_NUM
|
static int |
SYSCHECKS_CATALOG_NUM
|
static int |
SYSCOLUMNS_CATALOG_NUM
|
static int |
SYSCONGLOMERATES_CATALOG_NUM
|
static int |
SYSCONSTRAINTS_CATALOG_NUM
Catalog numbers for non core system catalogs. |
static int |
SYSDEPENDS_CATALOG_NUM
|
static int |
SYSDUMMY1_CATALOG_NUM
|
static int |
SYSFILES_CATALOG_NUM
|
static int |
SYSFOREIGNKEYS_CATALOG_NUM
|
static int |
SYSKEYS_CATALOG_NUM
|
static int |
SYSSCHEMAS_CATALOG_NUM
|
static int |
SYSSTATEMENTS_CATALOG_NUM
|
static int |
SYSSTATISTICS_CATALOG_NUM
|
static int |
SYSTABLES_CATALOG_NUM
|
static int |
SYSTRIGGERS_CATALOG_NUM
|
static int |
SYSVIEWS_CATALOG_NUM
|
static int |
UNIQUE_CONSTRAINT
|
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 tuple,
TupleDescriptor parent,
int catalogNumber,
boolean allowsDuplicates,
TransactionController tc)
Adds a descriptor to a system catalog identified by the catalogNumber. |
void |
addDescriptorArray(TupleDescriptor[] tuple,
TupleDescriptor parent,
int catalogNumber,
boolean allowsDuplicates,
TransactionController tc)
array version of addDescriptor. |
void |
addSPSDescriptor(SPSDescriptor descriptor,
TransactionController tc,
boolean wait)
Adds the given SPSDescriptor to the data dictionary, associated with the given table and constraint type. |
boolean |
checkVersion(int majorVersion,
java.lang.String feature)
Check to see if a database has been upgraded to the required level in order to use a langauge feature that is. |
void |
clearCaches()
Clear all of the DataDictionary caches. |
RowLocation[] |
computeAutoincRowLocations(TransactionController tc,
TableDescriptor td)
returns an array of RowLocations corresponding to the autoincrement columns in the table. |
void |
doneReading(int mode,
LanguageConnectionContext lcc)
Inform this DataDictionary that we have finished reading it. |
void |
dropAliasDescriptor(AliasDescriptor ad,
TransactionController tc)
Drop an 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. |
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 dependency from the data dictionary. |
void |
dropTableDescriptor(TableDescriptor td,
SchemaDescriptor schema,
TransactionController tc)
Drop the table descriptor. |
void |
dropTriggerDescriptor(TriggerDescriptor descriptor,
TransactionController tc)
Drops the given TriggerDescriptor that is associated with the given table and constraint type from the data dictionary. |
void |
dropViewDescriptor(ViewDescriptor viewDescriptor,
TransactionController tc)
Drops the view descriptor from the data dictionary. |
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 an AliasDescriptor given its UUID. |
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. |
int |
getCacheMode()
Returns the cache mode of the data dictionary. |
ColumnDescriptor |
getColumnDescriptorByDefaultId(UUID uuid)
Get a ColumnDescriptor given its Default ID. |
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. |
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. |
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 the DataValueFactory associated with this database. |
SchemaDescriptor |
getDeclaredGlobalTemporaryTablesSchemaDescriptor()
Get the descriptor for the declared global temporary table schema which is always named "SESSION". |
DependencyManager |
getDependencyManager()
Returns the dependency manager for this DataDictionary. |
java.util.List |
getDependentsDescriptorList(java.lang.String dependentID)
Gets a list of the dependency descriptors for the given dependent's id. |
int |
getEngineType()
|
ExecutionFactory |
getExecutionFactory()
Get the 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. |
ConstraintDescriptorList |
getForeignKeys(UUID constraintId)
Return a list of foreign keys constraints referencing this constraint. |
java.util.List |
getProvidersDescriptorList(java.lang.String providerID)
Gets a list of the dependency descriptors for the given provider's id. |
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 name,
SchemaDescriptor sd)
Get the stored prepared statement descriptor given a sps name. |
SPSDescriptor |
getSPSDescriptor(UUID uuid)
Get a SPSDescriptor given its UUID. |
DataTypeDescriptor[] |
getSPSParams(SPSDescriptor spsd,
java.util.Vector defaults)
Get all the parameter descriptors for an SPS. |
java.util.List |
getStatisticsDescriptors(TableDescriptor td)
Gets all statistics Descriptors for a given table. |
SubKeyConstraintDescriptor |
getSubKeyConstraint(UUID constraintId,
int type)
Get a SubKeyConstraintDescriptor from syskeys or sysforeignkeys for the specified constraint id. |
SchemaDescriptor |
getSysIBMSchemaDescriptor()
Get the descriptor for the SYSIBM schema. |
SchemaDescriptor |
getSystemDiagSchemaDescriptor()
Get the descriptor for the SYSCS_DIAG 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 |
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. |
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. |
UUIDFactory |
getUUIDFactory()
Get the UUID Factory. |
ViewDescriptor |
getViewDescriptor(TableDescriptor td)
Gets the viewDescriptor for the view given its TableDescriptor. |
ViewDescriptor |
getViewDescriptor(UUID uuid)
Gets the viewDescriptor for the view with the given UUID. |
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 |
invalidateAllSPSPlans()
Invalidate all the stored plans in SYS.SYSSTATEMENTS. |
boolean |
isSchemaEmpty(SchemaDescriptor sd)
Indicate whether there is anything in the particular schema. |
boolean |
isSystemSchemaName(java.lang.String name)
Determine whether a string is the name of the system schema. |
DataDictionaryContext |
pushDataDictionaryContext(ContextManager cm,
boolean nested)
Push a data dictionary context onto the current context manager. |
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. |
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 |
transactionFinished()
Inform this DataDictionary that the transaction in which writes have been done (or may have been done) has been committed or rolled back. |
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 updateSYSCOLUMNS,
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. |
Field Detail |
public static final java.lang.String MODULE
public static final int DD_VERSION_CURRENT
public static final int DD_VERSION_CS_5_0
public static final int DD_VERSION_CS_5_1
public static final int DD_VERSION_CS_5_2
public static final int DD_VERSION_CS_8_1
public static final int DD_VERSION_CS_10_0
public static final int DD_VERSION_DERBY_10_1
public static final java.lang.String DATABASE_ID
public static final java.lang.String CORE_DATA_DICTIONARY_VERSION
public static final java.lang.String CREATE_DATA_DICTIONARY_VERSION
public static final java.lang.String SOFT_DATA_DICTIONARY_VERSION
public static final java.lang.String PROPERTY_CONGLOMERATE_VERSION
public static final int SYSCONGLOMERATES_CATALOG_NUM
public static final int SYSTABLES_CATALOG_NUM
public static final int SYSCOLUMNS_CATALOG_NUM
public static final int SYSSCHEMAS_CATALOG_NUM
public static final int SYSCONSTRAINTS_CATALOG_NUM
public static final int SYSKEYS_CATALOG_NUM
public static final int SYSDEPENDS_CATALOG_NUM
public static final int SYSALIASES_CATALOG_NUM
public static final int SYSVIEWS_CATALOG_NUM
public static final int SYSCHECKS_CATALOG_NUM
public static final int SYSFOREIGNKEYS_CATALOG_NUM
public static final int SYSSTATEMENTS_CATALOG_NUM
public static final int SYSFILES_CATALOG_NUM
public static final int SYSTRIGGERS_CATALOG_NUM
public static final int SYSSTATISTICS_CATALOG_NUM
public static final int SYSDUMMY1_CATALOG_NUM
public static final int NOTNULL_CONSTRAINT
public static final int PRIMARYKEY_CONSTRAINT
public static final int UNIQUE_CONSTRAINT
public static final int CHECK_CONSTRAINT
public static final int DROP_CONSTRAINT
public static final int FOREIGNKEY_CONSTRAINT
public static final int COMPILE_ONLY_MODE
public static final int DDL_MODE
Method Detail |
public DataDictionaryContext pushDataDictionaryContext(ContextManager cm, boolean nested)
nested
- true iff this is a nested data dictionary context.public void clearCaches() throws StandardException
StandardException
- Standard Cloudscape error policypublic int startReading(LanguageConnectionContext lcc) throws StandardException
lcc
- The LanguageConnectionContext to use.
StandardException
- Thrown on errorpublic void doneReading(int mode, LanguageConnectionContext lcc) throws StandardException
mode
- The mode that was returned by startReading().lcc
- The LanguageConnectionContext to use.
StandardException
- Thrown on errorpublic void startWriting(LanguageConnectionContext lcc) throws StandardException
lcc
- The LanguageConnectionContext to use.
StandardException
- Thrown on errorpublic void transactionFinished() throws StandardException
StandardException
- Thrown on errorpublic ExecutionFactory getExecutionFactory()
public DataValueFactory getDataValueFactory()
public DataDescriptorGenerator getDataDescriptorGenerator()
public TabInfo getTabInfo(java.lang.String tableName) throws StandardException
tableName
- name of table to get the TabInfo for.
StandardException
- Thrown on errorpublic SchemaDescriptor getSchemaDescriptor(java.lang.String schemaName, TransactionController tc, boolean raiseError) throws StandardException
schemaName
- 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 errorpublic SchemaDescriptor getSchemaDescriptor(UUID schemaId, TransactionController tc) throws StandardException
schemaId
- The id of the schema we're interested in.
If the name is NULL, get the descriptor for the
current schema.tc
- The transaction controller to us when scanning
SYSSCHEMAS
StandardException
- Thrown on failurepublic SchemaDescriptor getSystemSchemaDescriptor() throws StandardException
StandardException
- Thrown on failurepublic SchemaDescriptor getSysIBMSchemaDescriptor() throws StandardException
StandardException
- Thrown on failurepublic SchemaDescriptor getSystemDiagSchemaDescriptor() throws StandardException
StandardException
- Thrown on failurepublic SchemaDescriptor getDeclaredGlobalTemporaryTablesSchemaDescriptor() throws StandardException
StandardException
- Thrown on failurepublic boolean isSystemSchemaName(java.lang.String name) throws StandardException
name
-
StandardException
- Thrown on failurepublic void dropSchemaDescriptor(java.lang.String schemaName, TransactionController tc) throws StandardException
schemaName
- The name of the schema to droptc
- Transaction Controller
StandardException
- Thrown on failurepublic boolean isSchemaEmpty(SchemaDescriptor sd) throws StandardException
StandardException
- on errorpublic TableDescriptor getTableDescriptor(java.lang.String tableName, SchemaDescriptor schema) throws StandardException
tableName
- The name of the table to get the descriptor forschema
- The descriptor for the schema the table lives in.
If null, use the current (default) schema.
StandardException
- Thrown on failurepublic TableDescriptor getTableDescriptor(UUID tableID) throws StandardException
tableID
- The UUID of the table to get the descriptor for
StandardException
- Thrown on failurepublic void dropTableDescriptor(TableDescriptor td, SchemaDescriptor schema, TransactionController tc) throws StandardException
schema
- 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 errorpublic void updateLockGranularity(TableDescriptor td, SchemaDescriptor schema, char lockGranularity, TransactionController tc) throws StandardException
td
- The TableDescriptor for the tableschema
- The SchemaDescriptor for the tablelockGranularity
- The new lockGranularitytc
- The TransactionController to use.
StandardException
- Thrown on errorpublic ColumnDescriptor getColumnDescriptorByDefaultId(UUID uuid) throws StandardException
uuid
- The UUID of the default
StandardException
- Thrown on failurepublic void dropColumnDescriptor(UUID tableID, java.lang.String columnName, TransactionController tc) throws StandardException
tableID
- The UUID of the table to drop the column fromcolumnName
- The name of the column to droptc
- TransactionController for the transaction
StandardException
- Thrown on failurepublic void dropAllColumnDescriptors(UUID tableID, TransactionController tc) throws StandardException
tableID
- The UUID of the table from which to drop
all the column descriptorstc
- TransactionController for the transaction
StandardException
- Thrown on failurepublic ViewDescriptor getViewDescriptor(UUID uuid) throws StandardException
uuid
- The UUID for the view
StandardException
- Thrown on errorpublic ViewDescriptor getViewDescriptor(TableDescriptor td) throws StandardException
td
- The TableDescriptor for the view.
StandardException
- Thrown on errorpublic void dropViewDescriptor(ViewDescriptor viewDescriptor, TransactionController tc) throws StandardException
viewDescriptor
- A descriptor for the view to be droppedtc
- TransactionController to use
StandardException
- Thrown on failurepublic ConstraintDescriptor getConstraintDescriptor(UUID uuid) throws StandardException
uuid
- The UUID
StandardException
- Thrown on failurepublic ConstraintDescriptor getConstraintDescriptor(java.lang.String constraintName, UUID schemaID) throws StandardException
constraintName
- Constraint name.schemaID
- The schema UUID
StandardException
- Thrown on failurepublic ConstraintDescriptorList getConstraintDescriptors(TableDescriptor td) throws StandardException
StandardException
- Thrown on failurepublic ConstraintDescriptorList getActiveConstraintDescriptors(ConstraintDescriptorList cdl) throws StandardException
cdl
- The constraint descriptor list to wrap with
an Active constraint descriptor list.
StandardException
- Thrown on failurepublic boolean activeConstraint(ConstraintDescriptor constraint) throws StandardException
constraint
- the constraint to check
StandardException
- Thrown on failurepublic ConstraintDescriptor getConstraintDescriptor(TableDescriptor td, UUID uuid) throws StandardException
uuid
- The UUID for the backing index.
StandardException
- Thrown on failurepublic ConstraintDescriptor getConstraintDescriptorById(TableDescriptor td, UUID uuid) throws StandardException
uuid
- The UUID for the constraint
StandardException
- Thrown on failurepublic ConstraintDescriptor getConstraintDescriptorByName(TableDescriptor td, SchemaDescriptor sd, java.lang.String constraintName, boolean forUpdate) throws StandardException
sd
- The schema descriptor for the constraintconstraintName
- The constraint name.forUpdate
- Whether or not access is for update
StandardException
- Thrown on failurepublic TableDescriptor getConstraintTableDescriptor(UUID constraintId) throws StandardException
constraintId
- The id of the constraint
StandardException
- Thrown on errorpublic ConstraintDescriptorList getForeignKeys(UUID constraintId) throws StandardException
constraintId
- The id of the referenced constraint
StandardException
- Thrown on errorpublic void addConstraintDescriptor(ConstraintDescriptor descriptor, TransactionController tc) throws StandardException
descriptor
- The descriptor to addtc
- The transaction controller
StandardException
- Thrown on errorpublic void dropConstraintDescriptor(TableDescriptor table, ConstraintDescriptor descriptor, TransactionController tc) throws StandardException
table
- The table from which to drop the
constraint descriptordescriptor
- The descriptor to droptc
- The TransactionController.
StandardException
- Thrown on failurepublic void dropAllConstraintDescriptors(TableDescriptor table, TransactionController tc) throws StandardException
table
- The table from which to drop all
constraint descriptorstc
- The TransactionController.
StandardException
- Thrown on failurepublic void updateConstraintDescriptor(ConstraintDescriptor cd, UUID formerUUID, int[] colsToSet, TransactionController tc) throws StandardException
cd
- 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 failurepublic SubKeyConstraintDescriptor getSubKeyConstraint(UUID constraintId, int type) throws StandardException
constraintId
- The UUID for the constraint.type
- The type of the constraint
(e.g. DataDictionary.FOREIGNKEY_CONSTRAINT)
StandardException
- Thrown on failurepublic SPSDescriptor getSPSDescriptor(UUID uuid) throws StandardException
uuid
- The UUID
StandardException
- Thrown on failurepublic SPSDescriptor getSPSDescriptor(java.lang.String name, SchemaDescriptor sd) throws StandardException
name
- The sps name.sd
- The schema descriptor.
StandardException
- Thrown on failurepublic java.util.List getAllSPSDescriptors() throws StandardException
StandardException
- Thrown on failurepublic DataTypeDescriptor[] getSPSParams(SPSDescriptor spsd, java.util.Vector defaults) throws StandardException
spsd
- sps descriptordefaults
- the parameter defaults. If not null,
all the parameter defaults will be stuffed
in here.
StandardException
- Thrown on errorpublic void addSPSDescriptor(SPSDescriptor descriptor, TransactionController tc, boolean wait) throws StandardException
descriptor
- The descriptor to addtc
- The transaction controllerwait
- To wait for lock or not
StandardException
- Thrown on errorpublic void updateSPS(SPSDescriptor spsd, TransactionController tc, boolean recompile, boolean updateSYSCOLUMNS, boolean wait, boolean firstCompilation) throws StandardException
tc
- The transaction controllerrecompile
- whether to recompile or invalidateupdateSYSCOLUMNS
- indicate whether syscolumns needs to be updated
or not.wait
- If true, then the caller wants to wait for locks. False will befirstCompilation
- first time SPS is getting compiled.
when we using a nested user xaction - we want to timeout right away if
the parent holds the lock. (bug 4821)
StandardException
- Thrown on errorpublic void dropSPSDescriptor(SPSDescriptor descriptor, TransactionController tc) throws StandardException
descriptor
- The descriptor to droptc
- The TransactionController.
StandardException
- Thrown on failurepublic void dropSPSDescriptor(UUID uuid, TransactionController tc) throws StandardException
uuid
- the statement uuidtc
- The TransactionController.
StandardException
- Thrown on failurepublic void invalidateAllSPSPlans() throws StandardException
StandardException
- Thrown on errorpublic TriggerDescriptor getTriggerDescriptor(UUID uuid) throws StandardException
uuid
- The UUID
StandardException
- Thrown on failurepublic TriggerDescriptor getTriggerDescriptor(java.lang.String name, SchemaDescriptor sd) throws StandardException
name
- The sps name.sd
- The schema descriptor.
StandardException
- Thrown on failurepublic GenericDescriptorList getTriggerDescriptors(TableDescriptor td) throws StandardException
StandardException
- Thrown on failurepublic void updateTriggerDescriptor(TriggerDescriptor triggerd, UUID formerUUID, int[] colsToSet, TransactionController tc) throws StandardException
triggerd
- The TriggerescriptorformerUUID
- 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 failurepublic void dropTriggerDescriptor(TriggerDescriptor descriptor, TransactionController tc) throws StandardException
descriptor
- The descriptor to droptc
- The TransactionController.
StandardException
- Thrown on failurepublic java.util.Hashtable hashAllConglomerateDescriptorsByNumber(TransactionController tc) throws StandardException
tc
- TransactionController for the transaction
StandardException
- Thrown on failurepublic java.util.Hashtable hashAllTableDescriptorsByTableId(TransactionController tc) throws StandardException
tc
- TransactionController for the transaction
StandardException
- Thrown on failurepublic ConglomerateDescriptor getConglomerateDescriptor(UUID uuid) throws StandardException
uuid
- The UUID
StandardException
- Thrown on failurepublic ConglomerateDescriptor[] getConglomerateDescriptors(UUID uuid) throws StandardException
uuid
- The UUID
StandardException
- Thrown on failurepublic ConglomerateDescriptor getConglomerateDescriptor(long conglomerateNumber) throws StandardException
conglomerateNumber
- The conglomerate number.
StandardException
- Thrown on failurepublic ConglomerateDescriptor[] getConglomerateDescriptors(long conglomerateNumber) throws StandardException
conglomerateNumber
- The number for the conglomerate
we're interested in
StandardException
- Thrown on failurepublic ConglomerateDescriptor getConglomerateDescriptor(java.lang.String indexName, SchemaDescriptor sd, boolean forUpdate) throws StandardException
indexName
- 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 failurepublic void dropConglomerateDescriptor(ConglomerateDescriptor conglomerate, TransactionController tc) throws StandardException
conglomerate
- The ConglomerateDescriptor for the conglomeratetc
- TransactionController for the transaction
StandardException
- Thrown on failurepublic void dropAllConglomerateDescriptors(TableDescriptor td, TransactionController tc) throws StandardException
tc
- TransactionController for the transaction
StandardException
- Thrown on failurepublic void updateConglomerateDescriptor(ConglomerateDescriptor[] cds, long conglomerateNumber, TransactionController tc) throws StandardException
cds
- The array of ConglomerateDescriptorsconglomerateNumber
- The new conglomerate numbertc
- The TransactionController to use
StandardException
- Thrown on failurepublic void updateConglomerateDescriptor(ConglomerateDescriptor cd, long conglomerateNumber, TransactionController tc) throws StandardException
cd
- The ConglomerateDescriptorconglomerateNumber
- The new conglomerate numbertc
- The TransactionController to use
StandardException
- Thrown on failurepublic java.util.List getDependentsDescriptorList(java.lang.String dependentID) throws StandardException
dependentID
- The ID of the dependent we're interested in
StandardException
- Thrown on failurepublic java.util.List getProvidersDescriptorList(java.lang.String providerID) throws StandardException
StandardException
- Thrown on failurepublic java.util.List getAllDependencyDescriptorsList() throws StandardException
StandardException
- Thrown on failurepublic void dropStoredDependency(DependencyDescriptor dd, TransactionController tc) throws StandardException
dd
- The DependencyDescriptor.tc
- TransactionController for the transaction
StandardException
- Thrown on failurepublic void dropDependentsStoredDependencies(UUID dependentsUUID, TransactionController tc) throws StandardException
dependentsUUID
- Dependent's uuidtc
- TransactionController for the transaction
StandardException
- Thrown on failurepublic UUIDFactory getUUIDFactory()
public AliasDescriptor getAliasDescriptor(UUID uuid) throws StandardException
uuid
- The UUID
StandardException
- Thrown on failurepublic AliasDescriptor getAliasDescriptor(java.lang.String schemaID, java.lang.String aliasName, char nameSpace) throws StandardException
aliasName
- The alias name.nameSpace
- The alias name space.
StandardException
- Thrown on failurepublic java.util.List getRoutineList(java.lang.String schemaID, java.lang.String routineName, char nameSpace) throws StandardException
StandardException
public void dropAliasDescriptor(AliasDescriptor ad, TransactionController tc) throws StandardException
ad
- The AliasDescriptor to droptc
- The TransactionController
StandardException
- Thrown on failurepublic TabInfo getCoreCatalog(int coreNum) throws StandardException
coreNum
- The index into coreInfo[].
StandardException
- Thrown on errorpublic int getEngineType()
public FileInfoDescriptor getFileInfoDescriptor(UUID id) throws StandardException
id
- The descriptor's id.
StandardException
- Thrown on failurepublic FileInfoDescriptor getFileInfoDescriptor(SchemaDescriptor sd, java.lang.String name) throws StandardException
sd
- the schema that holds the FileInfoDescriptor.
StandardException
- Thrown on failurepublic void dropFileInfoDescriptor(FileInfoDescriptor fid) throws StandardException
StandardException
- Oopspublic RowLocation[] computeAutoincRowLocations(TransactionController tc, TableDescriptor td) throws StandardException
tc
- TransactionControler to use to compute the row location.td
- TableDescriptor
standard
- exception on error.
StandardException
public RowLocation getRowLocationTemplate(LanguageConnectionContext lcc, TableDescriptor td) throws StandardException
StandardException
public NumberDataValue getSetAutoincrementValue(RowLocation rl, TransactionController tc, boolean doUpdate, NumberDataValue newValue, boolean wait) throws StandardException
rl
- 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.
StandardException
public void setAutoincrementValue(TransactionController tc, UUID tableUUID, java.lang.String columnName, long aiValue, boolean incrementNeeded) throws StandardException
tc
- Transaction Controller to use.columnName
- Name of the column.aiValue
- Value to write to SYSCOLUMNS.incrementNeeded
- Whether we should increment the value passed in by
the user (aiValue) before writing the value to SYSCOLUMNS.
StandardException
public java.util.List getStatisticsDescriptors(TableDescriptor td) throws StandardException
StandardException
public void dropStatisticsDescriptors(UUID tableUUID, UUID referenceUUID, TransactionController tc) throws StandardException
tableUUID
- UUID of the tablereferenceUUID
- UUID of the index. This can be null.tc
- Transcation Controller to use.
StandardException
public DependencyManager getDependencyManager()
DependencyManager
public int getCacheMode()
public java.lang.String getSystemSQLName()
public void addDescriptor(TupleDescriptor tuple, TupleDescriptor parent, int catalogNumber, boolean allowsDuplicates, TransactionController tc) throws StandardException
tuple
- 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.allowsDuplicates
- 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.
StandardException
SYSCONGLOMERATES_CATALOG_NUM
,
DataDictionaryImpl.duplicateDescriptorException(org.apache.derby.iapi.sql.dictionary.TupleDescriptor, org.apache.derby.iapi.sql.dictionary.TupleDescriptor)
,
addDescriptorArray(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 addDescriptorArray(TupleDescriptor[] tuple, TupleDescriptor parent, int catalogNumber, boolean allowsDuplicates, TransactionController tc) throws StandardException
StandardException
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 boolean checkVersion(int majorVersion, java.lang.String feature) throws StandardException
This is used to ensure new functionality that would lead on disk information not understood by a previous release is not executed while in soft upgrade mode. Ideally this is called at compile time and the parser has a utility method to enable easy use at parse time.
To use this method, a feature implemented in a certain release (DataDictionary version) would call it with the constant matching the release. E.g. for a new feature added in 10.1, a call such as
// check and throw an exception if the database is not at 10.1 dd.checkVersion(DataDictionary.DD_VERSION_DERBY_10_1, "NEW FEATURE NAME");This call would occur during the compile time, usually indirectly through the parser utility method, but direct calls can be made during QueryNode initialization, or even at bind time.
majorVersion
- Data Dictionary major version (DataDictionary.DD_ constant)feature
- Non-null to throw an error, null to return the state of the version match.
StandardException
|
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 |