public interface DataDictionary
Modifier and Type | Field and Description |
---|---|
static TypeDescriptor |
CATALOG_TYPE_SYSTEM_IDENTIFIER
An immutable catalog type that describes the type VARCHAR(128) NOT NULL
with collation type UCS_BASIC.
|
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
DatabaseMetaData will use this to determine if the data dictionary
is at the latest System Catalog version number.
|
static int |
DD_VERSION_DERBY_10_1
Derby 10.1 System Catalog version
|
static int |
DD_VERSION_DERBY_10_10
Derby 10.10 System Catalog version
|
static int |
DD_VERSION_DERBY_10_11
Derby 10.11 System Catalog version
|
static int |
DD_VERSION_DERBY_10_12
Derby 10.12 System Catalog version
|
static int |
DD_VERSION_DERBY_10_13
Derby 10.13 System Catalog version
|
static int |
DD_VERSION_DERBY_10_2
Derby 10.2 System Catalog version
|
static int |
DD_VERSION_DERBY_10_3
Derby 10.3 System Catalog version
|
static int |
DD_VERSION_DERBY_10_4
Derby 10.4 System Catalog version
|
static int |
DD_VERSION_DERBY_10_5
Derby 10.5 System Catalog version
|
static int |
DD_VERSION_DERBY_10_6
Derby 10.6 System Catalog version
|
static int |
DD_VERSION_DERBY_10_7
Derby 10.7 System Catalog version
|
static int |
DD_VERSION_DERBY_10_8
Derby 10.8 System Catalog version
|
static int |
DD_VERSION_DERBY_10_9
Derby 10.9 System Catalog version
|
static int |
DDL_MODE |
static int |
DROP_CONSTRAINT |
static int |
FOREIGNKEY_CONSTRAINT |
static int |
MODIFY_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 |
SYSCOLPERMS_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 |
SYSPERMS_CATALOG_NUM |
static int |
SYSROLES_CATALOG_NUM |
static int |
SYSROUTINEPERMS_CATALOG_NUM |
static int |
SYSSCHEMAS_CATALOG_NUM |
static int |
SYSSEQUENCES_CATALOG_NUM |
static int |
SYSSTATEMENTS_CATALOG_NUM |
static int |
SYSSTATISTICS_CATALOG_NUM |
static int |
SYSTABLEPERMS_CATALOG_NUM |
static int |
SYSTABLES_CATALOG_NUM |
static int |
SYSTRIGGERS_CATALOG_NUM |
static int |
SYSUSERS_CATALOG_NUM |
static int |
SYSVIEWS_CATALOG_NUM |
static DataTypeDescriptor |
TYPE_SYSTEM_IDENTIFIER
An immutable runtime type that describes the type VARCHAR(128) NOT NULL
with collation type UCS_BASIC and derivation IMPLICIT.
|
static int |
UNIQUE_CONSTRAINT |
Modifier and Type | Method and Description |
---|---|
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.
|
boolean |
addRemovePermissionsDescriptor(boolean add,
PermissionsDescriptor perm,
java.lang.String grantee,
TransactionController tc)
Add or remove a permission to the permission database.
|
void |
addSPSDescriptor(SPSDescriptor descriptor,
TransactionController tc)
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.
|
void |
clearCaches(boolean clearSequenceCaches)
Clear the DataDictionary caches, including the sequence caches if requested..
|
void |
clearSequenceCaches()
Clear all of the sequence number generators.
|
RowLocation[] |
computeAutoincRowLocations(TransactionController tc,
TableDescriptor td)
returns an array of RowLocations corresponding to
the autoincrement columns in the table.
|
void |
computeSequenceRowLocation(TransactionController tc,
java.lang.String sequenceIDstring,
RowLocation[] rowLocation,
SequenceDescriptor[] sequenceDescriptor)
Computes the RowLocation in SYSSEQUENCES for a particular sequence.
|
void |
createIndexStatsRefresher(Database db,
java.lang.String databaseName)
Creates an index statistics refresher for this data dictionary.
|
RoleClosureIterator |
createRoleClosureIterator(TransactionController tc,
java.lang.String role,
boolean inverse)
This method creates a new iterator over the closure of role
grants starting or ending with a given role.
|
void |
disableIndexStatsRefresher()
Disables automatic refresh/creation of index statistics at runtime.
|
boolean |
doCreateIndexStatsRefresher()
Tells if an index statistics refresher should be created for this
database.
|
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 |
dropAllPermDescriptors(UUID objectID,
TransactionController tc)
Drops all permission descriptors for the given object
|
void |
dropAllPermsByGrantee(java.lang.String authid,
TransactionController tc)
Drop all permission descriptors corresponding to a grant to
the named authentication identifier
|
void |
dropAllRoutinePermDescriptors(UUID routineID,
TransactionController tc)
Drops all routine permission descriptors for the given routine.
|
void |
dropAllTableAndColPermDescriptors(UUID tableID,
TransactionController tc)
Drops all table and column permission descriptors for 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(ConstraintDescriptor descriptor,
TransactionController tc)
Drops the given ConstraintDescriptor 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 |
dropDependentsStoredDependencies(UUID dependentsUUID,
TransactionController tc,
boolean wait)
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 |
dropRoleGrant(java.lang.String roleName,
java.lang.String grantee,
java.lang.String grantor,
TransactionController tc)
Drop a role grant
|
void |
dropRoleGrantsByGrantee(java.lang.String grantee,
TransactionController tc)
Drop all role grants corresponding to a grant of (any)
role to a named authentication identifier
|
void |
dropRoleGrantsByName(java.lang.String roleName,
TransactionController tc)
Drop all role grants corresponding to a grant of the
named role to any authentication identifier
|
void |
dropSchemaDescriptor(java.lang.String schemaName,
TransactionController tc)
Drop the descriptor for a schema, given the schema's name
|
void |
dropSequenceDescriptor(SequenceDescriptor sequenceDescriptor,
TransactionController tc)
Drop a sequence descriptor.
|
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 |
dropUser(java.lang.String userName,
TransactionController tc)
Drop a User from the DataDictionary
|
void |
dropViewDescriptor(ViewDescriptor viewDescriptor,
TransactionController tc)
Drops the view descriptor from the data dictionary.
|
int[] |
examineTriggerNodeAndCols(Visitable actionStmt,
java.lang.String oldReferencingName,
java.lang.String newReferencingName,
java.lang.String triggerDefinition,
int[] referencedCols,
int[] referencedColsInTriggerAction,
int actionOffset,
TableDescriptor triggerTableDescriptor,
int triggerEventMask,
boolean createTriggerTime,
java.util.List<int[]> replacements) |
boolean |
existsGrantToAuthid(java.lang.String authId,
TransactionController tc)
Check all dictionary tables and return true if there is any GRANT
descriptor containing
authId as its grantee. |
boolean |
existsSchemaOwnedBy(java.lang.String authid,
TransactionController tc)
Return true of there exists a schema whose authorizationId
equals authid, i.e.
|
void |
flushBulkInsertCounter(java.lang.String sequenceUUIDString,
BulkInsertCounter bic)
Flush the updated values of the BulkInsertCounter to disk and to the original, cached
SequenceUpdater.
|
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.
|
AliasDescriptor |
getAliasDescriptorForUDT(TransactionController tc,
DataTypeDescriptor dtd)
Get the alias descriptor for an ANSI UDT.
|
java.util.List<TupleDescriptor> |
getAllDependencyDescriptorsList()
Build and return an List with DependencyDescriptors for
all of the stored dependencies.
|
java.util.List<SPSDescriptor> |
getAllSPSDescriptors()
Get every statement in this database.
|
java.lang.String |
getAuthorizationDatabaseOwner()
Get authorizationID of Database Owner
|
java.lang.String |
getBuiltinVTIClass(TableDescriptor td,
boolean asTableFunction)
Return the Java class to use for a builtin VTI to which the received
table descriptor maps.
|
BulkInsertCounter |
getBulkInsertCounter(java.lang.String sequenceUUIDString,
boolean restart)
Get the identity generator used to support the bulk-insert optimization
in InsertResultSet.
|
int |
getCacheMode()
Returns the cache mode of the data dictionary.
|
int |
getCollationTypeOfSystemSchemas()
Return the collation type for SYSTEM schemas.
|
int |
getCollationTypeOfUserSchemas()
Return the collation type for user schemas.
|
DependableFinder |
getColumnDependableFinder(int formatId,
byte[] columnBitMap)
Get a
DependableFinder instance for referenced columns in
a table. |
ColumnDescriptor |
getColumnDescriptorByDefaultId(UUID uuid)
Get a ColumnDescriptor given its Default ID.
|
ColPermsDescriptor |
getColumnPermissions(UUID colPermsUUID)
Get one user's column privileges on a table using colPermsUUID
|
ColPermsDescriptor |
getColumnPermissions(UUID tableUUID,
int privType,
boolean forGrant,
java.lang.String authorizationId)
Get one user's column privileges for a table.
|
ColPermsDescriptor |
getColumnPermissions(UUID tableUUID,
java.lang.String privTypeStr,
boolean forGrant,
java.lang.String authorizationId)
Get one user's column privileges for a table.
|
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 (or all) and return it.
|
TableDescriptor |
getConstraintTableDescriptor(UUID constraintId)
Return a table descriptor corresponding to the TABLEID
field in SYSCONSTRAINTS where CONSTRAINTID matches
the constraintId passed in.
|
void |
getCurrentValueAndAdvance(java.lang.String sequenceUUIDstring,
NumberDataValue returnValue)
Get the next number from an ANSI/ISO sequence generator
which was created with the CREATE SEQUENCE statement.
|
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".
|
DependableFinder |
getDependableFinder(int formatId)
Get a
DependableFinder instance. |
DependencyManager |
getDependencyManager()
Returns the dependency manager for this DataDictionary.
|
java.util.List<DependencyDescriptor> |
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.
|
PermDescriptor |
getGenericPermissions(UUID permUUID)
Get one user's privileges for an object using the permUUID
|
PermDescriptor |
getGenericPermissions(UUID objectUUID,
java.lang.String objectType,
java.lang.String privilege,
java.lang.String granteeAuthId)
Get permissions granted to one user for an object using the object's Id
and the user's authorization Id.
|
IndexStatisticsDaemon |
getIndexStatsRefresher(boolean asDaemon)
Returns the index statistics refresher.
|
java.util.List<DependencyDescriptor> |
getProvidersDescriptorList(java.lang.String providerID)
Gets a list of the dependency descriptors for the given provider's id.
|
RoleGrantDescriptor |
getRoleDefinitionDescriptor(java.lang.String roleName)
Get a role grant descriptor for a role definition.
|
RoleGrantDescriptor |
getRoleGrantDescriptor(java.lang.String roleName,
java.lang.String grantee,
java.lang.String grantor)
Get a descriptor for a role grant
|
RoleGrantDescriptor |
getRoleGrantDescriptor(UUID uuid)
Get the role grant descriptor corresponding to the uuid provided
|
java.util.List<AliasDescriptor> |
getRoutineList(java.lang.String schemaID,
java.lang.String routineName,
char nameSpace)
Get the list of routines matching the schema and routine name.
|
RoutinePermsDescriptor |
getRoutinePermissions(UUID routinePermsUUID)
Get one user's privileges for a routine using routinePermsUUID
|
RoutinePermsDescriptor |
getRoutinePermissions(UUID routineUUID,
java.lang.String authorizationId)
Get one user's permissions for a routine (function or procedure).
|
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,
int isolationLevel,
TransactionController tc)
Get the SchemaDescriptor for the given schema identifier.
|
SchemaDescriptor |
getSchemaDescriptor(UUID schemaId,
TransactionController tc)
Get the SchemaDescriptor for the given schema identifier.
|
SequenceDescriptor |
getSequenceDescriptor(SchemaDescriptor sd,
java.lang.String sequenceName)
get a descriptor for a Sequence by sequence name
|
SequenceDescriptor |
getSequenceDescriptor(UUID uuid)
get a descriptor for a Sequence by uuid
|
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.List<DataValueDescriptor> defaults)
Get all the parameter descriptors for an SPS.
|
java.util.List<StatisticsDescriptor> |
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 |
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
|
TableDescriptor |
getTableDescriptor(java.lang.String tableName,
SchemaDescriptor schema,
TransactionController tc)
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.
|
TablePermsDescriptor |
getTablePermissions(UUID tablePermsUUID)
Get one user's privileges on a table using tablePermsUUID
|
TablePermsDescriptor |
getTablePermissions(UUID tableUUID,
java.lang.String authorizationId)
Get one user's privileges on a table using tableUUID and authorizationid
|
java.lang.String |
getTriggerActionString(Visitable actionStmt,
java.lang.String oldReferencingName,
java.lang.String newReferencingName,
java.lang.String triggerDefinition,
int[] referencedCols,
int[] referencedColsInTriggerAction,
int actionOffset,
TableDescriptor triggerTableDescriptor,
int triggerEventMask,
boolean createTriggerTime,
java.util.List<int[]> replacements,
int[] cols)
This method does the job of transforming the trigger action plan text
as shown below.
|
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.
|
TriggerDescriptorList |
getTriggerDescriptors(TableDescriptor td)
Load up the trigger descriptor list for this table
descriptor and return it.
|
UserDescriptor |
getUser(java.lang.String userName)
Return the credentials descriptor for the named user.
|
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.lang.String |
getVTIClass(TableDescriptor td,
boolean asTableFunction)
Return the Java class to use for the VTI to which the received
table descriptor maps.
|
java.util.Hashtable<java.lang.Long,ConglomerateDescriptor> |
hashAllConglomerateDescriptorsByNumber(TransactionController tc)
Get all of the ConglomerateDescriptors in the database and
hash them by conglomerate number.
|
java.util.Hashtable<UUID,TableDescriptor> |
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.
|
void |
invalidateAllSPSPlans(LanguageConnectionContext lcc)
Invalidate all the stored plans in SYS.SYSSTATEMENTS for
the given language connection context.
|
boolean |
isReadOnlyUpgrade()
Check if the database is read only and requires some form of upgrade
that makes the stored prepared statements invalid.
|
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.
|
PasswordHasher |
makePasswordHasher(java.util.Dictionary<?,?> props)
Get the default password hasher for this database level.
|
java.lang.Long |
peekAtIdentity(java.lang.String schemaName,
java.lang.String tableName)
Peek at the next value which will be returned by an identity generator.
|
java.lang.Long |
peekAtSequence(java.lang.String schemaName,
java.lang.String sequenceName)
Peek at the next value which will be returned by a sequence generator.
|
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.
|
boolean |
updateCurrentSequenceValue(TransactionController tc,
RowLocation rowLocation,
boolean wait,
java.lang.Long oldValue,
java.lang.Long newValue)
Set the current value of an ANSI/ISO sequence.
|
void |
updateLockGranularity(TableDescriptor td,
SchemaDescriptor schema,
char lockGranularity,
TransactionController tc)
Update the lockGranularity for the specified table.
|
void |
updateMetadataSPSes(TransactionController tc)
Drop and recreate metadata stored prepared statements.
|
void |
updateSPS(SPSDescriptor spsd,
TransactionController tc,
boolean recompile)
Updates SYS.SYSSTATEMENTS with the info from the
SPSD.
|
void |
updateSYSCOLPERMSforAddColumnToUserTable(UUID tableID,
TransactionController tc)
Need to update SYSCOLPERMS for a given table because a new column has
been added to that table.
|
void |
updateSYSCOLPERMSforDropColumn(UUID tableID,
TransactionController tc,
ColumnDescriptor columnDescriptor)
Update SYSCOLPERMS to reflect the dropping of a column from a table.
|
void |
updateTriggerDescriptor(TriggerDescriptor triggerd,
UUID formerUUID,
int[] colsToSet,
TransactionController tc)
Update the trigger descriptor in question.
|
void |
updateUser(UserDescriptor newDescriptor,
TransactionController tc)
Update a user.
|
boolean |
usesSqlAuthorization()
Get authorization model in force, SqlStandard or legacy mode
|
static final java.lang.String MODULE
static final int DD_VERSION_CURRENT
static final int DD_VERSION_CS_5_0
static final int DD_VERSION_CS_5_1
static final int DD_VERSION_CS_5_2
static final int DD_VERSION_CS_8_1
static final int DD_VERSION_CS_10_0
static final int DD_VERSION_DERBY_10_1
static final int DD_VERSION_DERBY_10_2
static final int DD_VERSION_DERBY_10_3
static final int DD_VERSION_DERBY_10_4
static final int DD_VERSION_DERBY_10_5
static final int DD_VERSION_DERBY_10_6
static final int DD_VERSION_DERBY_10_7
static final int DD_VERSION_DERBY_10_8
static final int DD_VERSION_DERBY_10_9
static final int DD_VERSION_DERBY_10_10
static final int DD_VERSION_DERBY_10_11
static final int DD_VERSION_DERBY_10_12
static final int DD_VERSION_DERBY_10_13
static final java.lang.String DATABASE_ID
static final java.lang.String CORE_DATA_DICTIONARY_VERSION
static final java.lang.String CREATE_DATA_DICTIONARY_VERSION
static final java.lang.String SOFT_DATA_DICTIONARY_VERSION
static final java.lang.String PROPERTY_CONGLOMERATE_VERSION
static final DataTypeDescriptor TYPE_SYSTEM_IDENTIFIER
static final TypeDescriptor CATALOG_TYPE_SYSTEM_IDENTIFIER
static final int SYSCONGLOMERATES_CATALOG_NUM
static final int SYSTABLES_CATALOG_NUM
static final int SYSCOLUMNS_CATALOG_NUM
static final int SYSSCHEMAS_CATALOG_NUM
static final int SYSCONSTRAINTS_CATALOG_NUM
static final int SYSKEYS_CATALOG_NUM
static final int SYSDEPENDS_CATALOG_NUM
static final int SYSALIASES_CATALOG_NUM
static final int SYSVIEWS_CATALOG_NUM
static final int SYSCHECKS_CATALOG_NUM
static final int SYSFOREIGNKEYS_CATALOG_NUM
static final int SYSSTATEMENTS_CATALOG_NUM
static final int SYSFILES_CATALOG_NUM
static final int SYSTRIGGERS_CATALOG_NUM
static final int SYSSTATISTICS_CATALOG_NUM
static final int SYSDUMMY1_CATALOG_NUM
static final int SYSTABLEPERMS_CATALOG_NUM
static final int SYSCOLPERMS_CATALOG_NUM
static final int SYSROUTINEPERMS_CATALOG_NUM
static final int SYSROLES_CATALOG_NUM
static final int SYSSEQUENCES_CATALOG_NUM
static final int SYSPERMS_CATALOG_NUM
static final int SYSUSERS_CATALOG_NUM
static final int NOTNULL_CONSTRAINT
static final int PRIMARYKEY_CONSTRAINT
static final int UNIQUE_CONSTRAINT
static final int CHECK_CONSTRAINT
static final int DROP_CONSTRAINT
static final int FOREIGNKEY_CONSTRAINT
static final int MODIFY_CONSTRAINT
static final int COMPILE_ONLY_MODE
static final int DDL_MODE
void clearCaches(boolean clearSequenceCaches) throws StandardException
StandardException
- Standard Derby error policyvoid clearCaches() throws StandardException
StandardException
- Standard Derby error policyvoid clearSequenceCaches() throws StandardException
StandardException
- Standard Derby error policyint startReading(LanguageConnectionContext lcc) throws StandardException
lcc
- The LanguageConnectionContext to use.StandardException
- Thrown on errorvoid doneReading(int mode, LanguageConnectionContext lcc) throws StandardException
mode
- The mode that was returned by startReading().lcc
- The LanguageConnectionContext to use.StandardException
- Thrown on errorvoid startWriting(LanguageConnectionContext lcc) throws StandardException
lcc
- The LanguageConnectionContext to use.StandardException
- Thrown on errorvoid transactionFinished() throws StandardException
StandardException
- Thrown on errorExecutionFactory getExecutionFactory()
DataValueFactory getDataValueFactory()
DataDescriptorGenerator getDataDescriptorGenerator()
java.lang.String getAuthorizationDatabaseOwner()
boolean usesSqlAuthorization()
int getCollationTypeOfSystemSchemas()
int getCollationTypeOfUserSchemas()
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 errorSchemaDescriptor getSchemaDescriptor(UUID schemaId, TransactionController tc) throws StandardException
schemaId
- The id of the schema we're interested in.tc
- The transaction controller to us when scanning
SYSSCHEMASStandardException
- Thrown on failureSchemaDescriptor getSchemaDescriptor(UUID schemaId, int isolationLevel, TransactionController tc) throws StandardException
schemaId
- The id of the schema we're interested in.isolationLevel
- use this explicit isolation leveltc
- The transaction controller to us when scanning
SYSSCHEMASStandardException
- Thrown on failureboolean existsSchemaOwnedBy(java.lang.String authid, TransactionController tc) throws StandardException
authid
- authorizationIdtc
- TransactionControllerStandardException
PasswordHasher makePasswordHasher(java.util.Dictionary<?,?> props) throws StandardException
props
- The persistent properties used to configure password hashing.StandardException
SchemaDescriptor getSystemSchemaDescriptor() throws StandardException
StandardException
- Thrown on failureSchemaDescriptor getSysIBMSchemaDescriptor() throws StandardException
StandardException
- Thrown on failureSchemaDescriptor getDeclaredGlobalTemporaryTablesSchemaDescriptor() throws StandardException
StandardException
- Thrown on failureboolean isSystemSchemaName(java.lang.String name) throws StandardException
name
- StandardException
- Thrown on failurevoid dropRoleGrant(java.lang.String roleName, java.lang.String grantee, java.lang.String grantor, TransactionController tc) throws StandardException
roleName
- The name of the role to dropgrantee
- The granteegrantor
- The grantortc
- Transaction ControllerStandardException
- Thrown on failurevoid dropRoleGrantsByGrantee(java.lang.String grantee, TransactionController tc) throws StandardException
grantee
- The granteetc
- Transaction ControllerStandardException
- Thrown on failurevoid dropRoleGrantsByName(java.lang.String roleName, TransactionController tc) throws StandardException
roleName
- The role name grantedtc
- Transaction ControllerStandardException
- Thrown on failureRoleClosureIterator createRoleClosureIterator(TransactionController tc, java.lang.String role, boolean inverse) throws StandardException
dd.startReading()
or dd.startWriting()
call.tc
- transaction controllerrole
- name of starting point for closureinverse
- If true
, compute closure on inverse of
relation GRANT role-a TO role-b that is, we look at
closure of all roles granted role
. If
false
, we look at closure of all roles that have
been granted role
.StandardException
void dropAllPermsByGrantee(java.lang.String authid, TransactionController tc) throws StandardException
authid
- The authentication identifiertc
- Transaction ControllerStandardException
- Thrown on failurevoid dropSchemaDescriptor(java.lang.String schemaName, TransactionController tc) throws StandardException
schemaName
- The name of the schema to droptc
- Transaction ControllerStandardException
- Thrown on failureboolean isSchemaEmpty(SchemaDescriptor sd) throws StandardException
sd
- schema descriptorStandardException
- on errorTableDescriptor getTableDescriptor(java.lang.String tableName, SchemaDescriptor schema, TransactionController tc) 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.tc
- Transaction context.StandardException
- Thrown on failureTableDescriptor getTableDescriptor(UUID tableID) throws StandardException
tableID
- The UUID of the table to get the descriptor forStandardException
- Thrown on failurevoid dropTableDescriptor(TableDescriptor td, SchemaDescriptor schema, TransactionController tc) throws StandardException
td
- The table descriptor to dropschema
- 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 transactionStandardException
- Thrown on errorvoid 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 errorColumnDescriptor getColumnDescriptorByDefaultId(UUID uuid) throws StandardException
uuid
- The UUID of the defaultStandardException
- Thrown on failurevoid 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 transactionStandardException
- Thrown on failurevoid dropAllColumnDescriptors(UUID tableID, TransactionController tc) throws StandardException
tableID
- The UUID of the table from which to drop
all the column descriptorstc
- TransactionController for the transactionStandardException
- Thrown on failurevoid dropAllTableAndColPermDescriptors(UUID tableID, TransactionController tc) throws StandardException
tableID
- The UUID of the table for which to drop
all the table and column permission descriptorstc
- TransactionController for the transactionStandardException
- Thrown on failurevoid updateSYSCOLPERMSforAddColumnToUserTable(UUID tableID, TransactionController tc) throws StandardException
tableID
- The UUID of the table to which a column has been addedtc
- TransactionController for the transactionStandardException
- Thrown on errorvoid updateSYSCOLPERMSforDropColumn(UUID tableID, TransactionController tc, ColumnDescriptor columnDescriptor) throws StandardException
tableID
- The UUID of the table whose column has been droppedtc
- TransactionController for the transactioncolumnDescriptor
- Info about the dropped columnStandardException
- Thrown on errorvoid dropAllRoutinePermDescriptors(UUID routineID, TransactionController tc) throws StandardException
routineID
- The UUID of the routine for which to drop
all the permission descriptorstc
- TransactionController for the transactionStandardException
- Thrown on failureViewDescriptor getViewDescriptor(UUID uuid) throws StandardException
uuid
- The UUID for the viewStandardException
- Thrown on errorViewDescriptor getViewDescriptor(TableDescriptor td) throws StandardException
td
- The TableDescriptor for the view.StandardException
- Thrown on errorvoid dropViewDescriptor(ViewDescriptor viewDescriptor, TransactionController tc) throws StandardException
viewDescriptor
- A descriptor for the view to be droppedtc
- TransactionController to useStandardException
- Thrown on failureConstraintDescriptor getConstraintDescriptor(UUID uuid) throws StandardException
uuid
- The UUIDStandardException
- Thrown on failureConstraintDescriptor getConstraintDescriptor(java.lang.String constraintName, UUID schemaID) throws StandardException
constraintName
- Constraint name.schemaID
- The schema UUIDStandardException
- Thrown on failureConstraintDescriptorList getConstraintDescriptors(TableDescriptor td) throws StandardException
td
- The table descriptor.StandardException
- Thrown on failureConstraintDescriptorList getActiveConstraintDescriptors(ConstraintDescriptorList cdl) throws StandardException
cdl
- The constraint descriptor list to wrap with
an Active constraint descriptor list.StandardException
- Thrown on failureboolean activeConstraint(ConstraintDescriptor constraint) throws StandardException
constraint
- the constraint to checkStandardException
- Thrown on failureConstraintDescriptor getConstraintDescriptor(TableDescriptor td, UUID uuid) throws StandardException
td
- The table descriptor.uuid
- The UUID for the backing index.StandardException
- Thrown on failureConstraintDescriptor getConstraintDescriptorById(TableDescriptor td, UUID uuid) throws StandardException
td
- The table descriptor.uuid
- The UUID for the constraintStandardException
- Thrown on failureConstraintDescriptor getConstraintDescriptorByName(TableDescriptor td, SchemaDescriptor sd, java.lang.String constraintName, boolean forUpdate) throws StandardException
td
- The table descriptor.sd
- The schema descriptor for the constraintconstraintName
- The constraint name.forUpdate
- Whether or not access is for updateStandardException
- Thrown on failureTableDescriptor getConstraintTableDescriptor(UUID constraintId) throws StandardException
constraintId
- The id of the constraintStandardException
- Thrown on errorConstraintDescriptorList getForeignKeys(UUID constraintId) throws StandardException
constraintId
- The id of the referenced constraintStandardException
- Thrown on errorvoid addConstraintDescriptor(ConstraintDescriptor descriptor, TransactionController tc) throws StandardException
descriptor
- The descriptor to addtc
- The transaction controllerStandardException
- Thrown on errorvoid dropConstraintDescriptor(ConstraintDescriptor descriptor, TransactionController tc) throws StandardException
descriptor
- The descriptor to droptc
- The TransactionController.StandardException
- Thrown on failurevoid dropAllConstraintDescriptors(TableDescriptor table, TransactionController tc) throws StandardException
table
- The table from which to drop all
constraint descriptorstc
- The TransactionController.StandardException
- Thrown on failurevoid 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 useStandardException
- Thrown on failureSubKeyConstraintDescriptor 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 failureSPSDescriptor getSPSDescriptor(UUID uuid) throws StandardException
uuid
- The UUIDStandardException
- Thrown on failureSPSDescriptor getSPSDescriptor(java.lang.String name, SchemaDescriptor sd) throws StandardException
name
- The sps name.sd
- The schema descriptor.StandardException
- Thrown on failurejava.util.List<SPSDescriptor> getAllSPSDescriptors() throws StandardException
StandardException
- Thrown on failureDataTypeDescriptor[] getSPSParams(SPSDescriptor spsd, java.util.List<DataValueDescriptor> defaults) throws StandardException
spsd
- sps descriptordefaults
- the parameter defaults. If not null,
all the parameter defaults will be stuffed
in here.StandardException
- Thrown on errorvoid addSPSDescriptor(SPSDescriptor descriptor, TransactionController tc) throws StandardException
descriptor
- The descriptor to addtc
- The transaction controllerStandardException
- Thrown on errorvoid updateSPS(SPSDescriptor spsd, TransactionController tc, boolean recompile) throws StandardException
spsd
- The descriptor to addtc
- The transaction controllerrecompile
- whether to recompile or invalidateStandardException
- Thrown on errorvoid dropSPSDescriptor(SPSDescriptor descriptor, TransactionController tc) throws StandardException
descriptor
- The descriptor to droptc
- The TransactionController.StandardException
- Thrown on failurevoid dropSPSDescriptor(UUID uuid, TransactionController tc) throws StandardException
uuid
- the statement uuidtc
- The TransactionController.StandardException
- Thrown on failurevoid invalidateAllSPSPlans(LanguageConnectionContext lcc) throws StandardException
StandardException
- Thrown on errorvoid invalidateAllSPSPlans() throws StandardException
StandardException
- Thrown on errorTriggerDescriptor getTriggerDescriptor(UUID uuid) throws StandardException
uuid
- The UUIDStandardException
- Thrown on failureTriggerDescriptor getTriggerDescriptor(java.lang.String name, SchemaDescriptor sd) throws StandardException
name
- The sps name.sd
- The schema descriptor.StandardException
- Thrown on failureint[] examineTriggerNodeAndCols(Visitable actionStmt, java.lang.String oldReferencingName, java.lang.String newReferencingName, java.lang.String triggerDefinition, int[] referencedCols, int[] referencedColsInTriggerAction, int actionOffset, TableDescriptor triggerTableDescriptor, int triggerEventMask, boolean createTriggerTime, java.util.List<int[]> replacements) throws StandardException
StandardException
java.lang.String getTriggerActionString(Visitable actionStmt, java.lang.String oldReferencingName, java.lang.String newReferencingName, java.lang.String triggerDefinition, int[] referencedCols, int[] referencedColsInTriggerAction, int actionOffset, TableDescriptor triggerTableDescriptor, int triggerEventMask, boolean createTriggerTime, java.util.List<int[]> replacements, int[] cols) throws StandardException
actionStmt
- This is needed to get access to the various nodes
generated by the Parser for the trigger action sql. These nodes will be
used to find REFERENCEs column nodes.oldReferencingName
- The name specified by the user for REFERENCEs
to old row columnsnewReferencingName
- The name specified by the user for REFERENCEs
to new row columnstriggerDefinition
- The original trigger action text provided by
the user during CREATE TRIGGER time.referencedCols
- Trigger is defined on these columns (will be null
in case of INSERT AND DELETE Triggers. Can also be null for DELETE
Triggers if UPDATE trigger is not defined on specific column(s))referencedColsInTriggerAction
- what columns does the trigger
action reference through old/new transition variables (may be null)actionOffset
- offset of start of action clausetriggerTableDescriptor
- Table descriptor for trigger tabletriggerEventMask
- TriggerDescriptor.TRIGGER_EVENT_XXXcreateTriggerTime
- True if here for CREATE TRIGGER,
false if here because an invalidated row level trigger with
REFERENCEd columns has been fired and hence trigger action
sql associated with SPSDescriptor may be invalid too.replacements
- a list that will be populated with objects that
describe how triggerDefinition
has been transformed into
the returned SQL text. Each element in the list will contain four
integers. The first two describe the begin and end offset of the
replaced text in the triggerDefinition
. The last two describe
the begin and end offset of the replacement text in the returned
string. The begin offsets are inclusive, whereas the end offsets are
exclusive. The list can be null
if the caller does not care
about this information.StandardException
TriggerDescriptorList getTriggerDescriptors(TableDescriptor td) throws StandardException
td
- The table descriptor.StandardException
- Thrown on failurevoid 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 useStandardException
- Thrown on failurevoid dropTriggerDescriptor(TriggerDescriptor descriptor, TransactionController tc) throws StandardException
descriptor
- The descriptor to droptc
- The TransactionController.StandardException
- Thrown on failurejava.util.Hashtable<java.lang.Long,ConglomerateDescriptor> hashAllConglomerateDescriptorsByNumber(TransactionController tc) throws StandardException
tc
- TransactionController for the transactionStandardException
- Thrown on failurejava.util.Hashtable<UUID,TableDescriptor> hashAllTableDescriptorsByTableId(TransactionController tc) throws StandardException
tc
- TransactionController for the transactionStandardException
- Thrown on failureConglomerateDescriptor getConglomerateDescriptor(UUID uuid) throws StandardException
uuid
- The UUIDStandardException
- Thrown on failureConglomerateDescriptor[] getConglomerateDescriptors(UUID uuid) throws StandardException
uuid
- The UUIDStandardException
- Thrown on failureConglomerateDescriptor getConglomerateDescriptor(long conglomerateNumber) throws StandardException
conglomerateNumber
- The conglomerate number.StandardException
- Thrown on failureConglomerateDescriptor[] getConglomerateDescriptors(long conglomerateNumber) throws StandardException
conglomerateNumber
- The number for the conglomerate
we're interested inStandardException
- Thrown on failureConglomerateDescriptor 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 failurevoid dropConglomerateDescriptor(ConglomerateDescriptor conglomerate, TransactionController tc) throws StandardException
conglomerate
- The ConglomerateDescriptor for the conglomeratetc
- TransactionController for the transactionStandardException
- Thrown on failurevoid dropAllConglomerateDescriptors(TableDescriptor td, TransactionController tc) throws StandardException
td
- The TableDescriptor of the tabletc
- TransactionController for the transactionStandardException
- Thrown on failurevoid updateConglomerateDescriptor(ConglomerateDescriptor[] cds, long conglomerateNumber, TransactionController tc) throws StandardException
cds
- The array of ConglomerateDescriptorsconglomerateNumber
- The new conglomerate numbertc
- The TransactionController to useStandardException
- Thrown on failurevoid updateConglomerateDescriptor(ConglomerateDescriptor cd, long conglomerateNumber, TransactionController tc) throws StandardException
cd
- The ConglomerateDescriptorconglomerateNumber
- The new conglomerate numbertc
- The TransactionController to useStandardException
- Thrown on failurejava.util.List<DependencyDescriptor> getDependentsDescriptorList(java.lang.String dependentID) throws StandardException
dependentID
- The ID of the dependent we're interested inStandardException
- Thrown on failurejava.util.List<DependencyDescriptor> getProvidersDescriptorList(java.lang.String providerID) throws StandardException
providerID
- The ID of the provider we're interested inStandardException
- Thrown on failurejava.util.List<TupleDescriptor> getAllDependencyDescriptorsList() throws StandardException
StandardException
- Thrown on failurevoid dropStoredDependency(DependencyDescriptor dd, TransactionController tc) throws StandardException
dd
- The DependencyDescriptor.tc
- TransactionController for the transactionStandardException
- Thrown on failurevoid dropDependentsStoredDependencies(UUID dependentsUUID, TransactionController tc) throws StandardException
dependentsUUID
- Dependent's uuidtc
- TransactionController for the transactionStandardException
- Thrown on failureUUIDFactory getUUIDFactory()
AliasDescriptor getAliasDescriptorForUDT(TransactionController tc, DataTypeDescriptor dtd) throws StandardException
tc
- The transaction to use: if null, use the compilation transactiondtd
- The UDT's type descriptorStandardException
AliasDescriptor getAliasDescriptor(UUID uuid) throws StandardException
uuid
- The UUIDStandardException
- Thrown on failureAliasDescriptor getAliasDescriptor(java.lang.String schemaID, java.lang.String aliasName, char nameSpace) throws StandardException
schemaID
- schema identifieraliasName
- The alias name.nameSpace
- The alias name space.StandardException
- Thrown on failurejava.util.List<AliasDescriptor> getRoutineList(java.lang.String schemaID, java.lang.String routineName, char nameSpace) throws StandardException
StandardException
void dropAliasDescriptor(AliasDescriptor ad, TransactionController tc) throws StandardException
ad
- The AliasDescriptor to droptc
- The TransactionControllerStandardException
- Thrown on failurevoid updateUser(UserDescriptor newDescriptor, TransactionController tc) throws StandardException
newDescriptor
- New values for columns in the SYSUSERS row.tc
- The TransactionController to useStandardException
- Thrown on failureUserDescriptor getUser(java.lang.String userName) throws StandardException
userName
- Name of the user whose credentials we want.StandardException
- Thrown on failurevoid dropUser(java.lang.String userName, TransactionController tc) throws StandardException
userName
- The user to drop.tc
- The TransactionControllerStandardException
- Thrown on failureint getEngineType()
FileInfoDescriptor getFileInfoDescriptor(UUID id) throws StandardException
id
- The descriptor's id.StandardException
- Thrown on failureFileInfoDescriptor getFileInfoDescriptor(SchemaDescriptor sd, java.lang.String name) throws StandardException
sd
- the schema that holds the FileInfoDescriptor.name
- SQL name of file.StandardException
- Thrown on failurevoid dropFileInfoDescriptor(FileInfoDescriptor fid) throws StandardException
StandardException
- OopsRowLocation[] computeAutoincRowLocations(TransactionController tc, TableDescriptor td) throws StandardException
tc
- TransactionControler to use to compute the row location.td
- TableDescriptorStandardException
- if an error happensRowLocation getRowLocationTemplate(LanguageConnectionContext lcc, TableDescriptor td) throws StandardException
StandardException
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
void setAutoincrementValue(TransactionController tc, UUID tableUUID, java.lang.String columnName, long aiValue, boolean incrementNeeded) throws StandardException
tc
- Transaction Controller to use.tableUUID
- Table DescriptorcolumnName
- 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
void computeSequenceRowLocation(TransactionController tc, java.lang.String sequenceIDstring, RowLocation[] rowLocation, SequenceDescriptor[] sequenceDescriptor) throws StandardException
tc
- Transaction Controller to use.sequenceIDstring
- UUID of the sequence as a stringrowLocation
- OUTPUT param for returing the row locationsequenceDescriptor
- OUTPUT param for return the sequence descriptorStandardException
- thrown on failure.boolean updateCurrentSequenceValue(TransactionController tc, RowLocation rowLocation, boolean wait, java.lang.Long oldValue, java.lang.Long newValue) throws StandardException
tc
- Transaction Controller to use.rowLocation
- Row in SYSSEQUENCES to update.wait
- True if we should wait for locksoldValue
- What we expect to find in the CURRENTVALUE column.newValue
- What to stuff into the CURRENTVALUE column.StandardException
- thrown on failure.void getCurrentValueAndAdvance(java.lang.String sequenceUUIDstring, NumberDataValue returnValue) throws StandardException
sequenceUUIDstring
- String value of the UUID which identifies the sequencereturnValue
- This is a data value to be stuffed with the next sequence number.StandardException
- if the sequence does not cycle and its range is exhaustedjava.lang.Long peekAtIdentity(java.lang.String schemaName, java.lang.String tableName) throws StandardException
Peek at the next value which will be returned by an identity generator.
StandardException
java.lang.Long peekAtSequence(java.lang.String schemaName, java.lang.String sequenceName) throws StandardException
Peek at the next value which will be returned by a sequence generator.
StandardException
java.util.List<StatisticsDescriptor> getStatisticsDescriptors(TableDescriptor td) throws StandardException
StandardException
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
DependencyManager getDependencyManager()
DependencyManager
int getCacheMode()
java.lang.String getSystemSQLName()
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)
void addDescriptorArray(TupleDescriptor[] tuple, TupleDescriptor parent, int catalogNumber, boolean allowsDuplicates, TransactionController tc) throws StandardException
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
boolean isReadOnlyUpgrade()
true
if the stored prepared statements are invalid
because of an upgrade and the database is read only, false
otherwiseboolean addRemovePermissionsDescriptor(boolean add, PermissionsDescriptor perm, java.lang.String grantee, TransactionController tc) throws StandardException
add
- if true then add the permission, if false remove it.perm
- grantee
- tc
- StandardException
TablePermsDescriptor getTablePermissions(UUID tableUUID, java.lang.String authorizationId) throws StandardException
tableUUID
- authorizationId
- The user nameStandardException
TablePermsDescriptor getTablePermissions(UUID tablePermsUUID) throws StandardException
tablePermsUUID
- StandardException
ColPermsDescriptor getColumnPermissions(UUID tableUUID, int privType, boolean forGrant, java.lang.String authorizationId) throws StandardException
tableUUID
- privType
- Authorizer.SELECT_PRIV, Authorizer.UPDATE_PRIV, or Authorizer.REFERENCES_PRIVforGrant
- authorizationId
- The user nameStandardException
ColPermsDescriptor getColumnPermissions(UUID tableUUID, java.lang.String privTypeStr, boolean forGrant, java.lang.String authorizationId) throws StandardException
tableUUID
- privTypeStr
- (as String) Authorizer.SELECT_PRIV, Authorizer.UPDATE_PRIV, or Authorizer.REFERENCES_PRIVforGrant
- authorizationId
- The user nameStandardException
ColPermsDescriptor getColumnPermissions(UUID colPermsUUID) throws StandardException
colPermsUUID
- StandardException
RoutinePermsDescriptor getRoutinePermissions(UUID routineUUID, java.lang.String authorizationId) throws StandardException
routineUUID
- authorizationId
- The user's nameStandardException
RoutinePermsDescriptor getRoutinePermissions(UUID routinePermsUUID) throws StandardException
routinePermsUUID
- StandardException
java.lang.String getVTIClass(TableDescriptor td, boolean asTableFunction) throws StandardException
td
- Table descriptor used for the VTI look-up.asTableFunction
- If false then treat td's descriptor name as a
VTI "table name"; if true, treat the descriptor name as a VTI "table
function name".StandardException
java.lang.String getBuiltinVTIClass(TableDescriptor td, boolean asTableFunction) throws StandardException
td
- Table descriptor used for the VTI look-up.asTableFunction
- If false then treat td's descriptor name as a
VTI "table name"; if true, treat the descriptor name as a VTI "table
function name".StandardException
RoleGrantDescriptor getRoleDefinitionDescriptor(java.lang.String roleName) throws StandardException
roleName
- The name of the role whose definition we seekStandardException
- errorRoleGrantDescriptor getRoleGrantDescriptor(UUID uuid) throws StandardException
uuid
- StandardException
- Thrown on errorRoleGrantDescriptor getRoleGrantDescriptor(java.lang.String roleName, java.lang.String grantee, java.lang.String grantor) throws StandardException
roleName
- The name of the role whose definition we seekgrantee
- The granteegrantor
- The grantorStandardException
- errorvoid dropDependentsStoredDependencies(UUID dependentsUUID, TransactionController tc, boolean wait) throws StandardException
dependentsUUID
- Dependent's uuidtc
- TransactionController for the transactionwait
- 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.StandardException
- Thrown on failureboolean existsGrantToAuthid(java.lang.String authId, TransactionController tc) throws StandardException
authId
as its grantee.authId
- grantee for which a grant exists or nottc
- TransactionController for the transactionStandardException
void updateMetadataSPSes(TransactionController tc) throws StandardException
tc
- the xactStandardException
void dropSequenceDescriptor(SequenceDescriptor sequenceDescriptor, TransactionController tc) throws StandardException
sequenceDescriptor
- tc
- StandardException
SequenceDescriptor getSequenceDescriptor(UUID uuid) throws StandardException
uuid
- uuid of the sequenceStandardException
- errorSequenceDescriptor getSequenceDescriptor(SchemaDescriptor sd, java.lang.String sequenceName) throws StandardException
sequenceName
- Name of the sequencesd
- The scemadescriptor teh sequence belongs toStandardException
- errorPermDescriptor getGenericPermissions(UUID objectUUID, java.lang.String objectType, java.lang.String privilege, java.lang.String granteeAuthId) throws StandardException
objectUUID
- ID of the object being protectedobjectType
- Type of the object (e.g., PermDescriptor.SEQUENCE_TYPE)privilege
- The kind of privilege needed (e.g., PermDescriptor.USAGE_PRIV)granteeAuthId
- The user who needs the permissionStandardException
PermDescriptor getGenericPermissions(UUID permUUID) throws StandardException
permUUID
- StandardException
void dropAllPermDescriptors(UUID objectID, TransactionController tc) throws StandardException
objectID
- The UUID of the object from which to drop
all permissionstc
- TransactionController for the transactionStandardException
- Thrown on errorboolean doCreateIndexStatsRefresher()
The only reason not to create an index statistics refresher is if one already exists.
true
if an index statistics refresher should be created,
false
if one already exists.void createIndexStatsRefresher(Database db, java.lang.String databaseName)
The index statistics refresher is used to create and refresh index cardinality statistics, either automatically or on user demand (i.e. by invoking SYSCS_UTIL.SYSCS_UPDATE_STATISTICS).
db
- the database object associated with this data dictionarydatabaseName
- the name of the databaseIndexStatisticsDaemon getIndexStatsRefresher(boolean asDaemon)
asDaemon
- whether the usage is automatic (true
) or
explicit (false
)null
if
disabled. If asDaemon
is false
, an instance will
always be returned.void disableIndexStatsRefresher()
If the daemon is disabled, it can only be enabled again by rebooting the database. Note that this method concerns diabling the daemon at runtime, and only the automatic updates of statistics. If wanted, the user would disable the daemon at boot-time by setting a property (system-wide or database property).
Usage note: This method was added to allow the index refresher itself to notify the data dictionary that it should be disabled. This only happens if the refresher/daemon experiences severe errors, or a large amount of errors. It would then disable itself to avoid eating up system resources and potentially cause side-effects due to the errors.
DependableFinder getDependableFinder(int formatId)
DependableFinder
instance.formatId
- the format idDependable
s with the
specified format idDependableFinder getColumnDependableFinder(int formatId, byte[] columnBitMap)
DependableFinder
instance for referenced columns in
a table.formatId
- the format idcolumnBitMap
- byte array encoding the bitmap of referenced columnsDependable
s with the
specified format idBulkInsertCounter getBulkInsertCounter(java.lang.String sequenceUUIDString, boolean restart) throws StandardException
sequenceUUIDString
- UUID of the sequence which backs the identity column.restart
- True if the counter should be re-initialized to its start position.StandardException
void flushBulkInsertCounter(java.lang.String sequenceUUIDString, BulkInsertCounter bic) throws StandardException
sequenceUUIDString
- UUID of the sequence which backs the identity column.bic
- the BulkInsertCounter which generates identities for bulk insertStandardException
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.