| org.apache.derby.iapi.sql.dictionary.DataDictionary
All known Subclasses: org.apache.derby.impl.sql.catalog.DataDictionaryImpl,
DataDictionary | public interface DataDictionary (Code) | | 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).
version: 0.1 author: Jeff Lichtman |
Method Summary | |
public boolean | activeConstraint(ConstraintDescriptor constraint) Reports whether an individual constraint must be
enforced. | public void | addConstraintDescriptor(ConstraintDescriptor descriptor, TransactionController tc) Adds the given ConstraintDescriptor to the data dictionary,
associated with the given table and constraint type. | public void | addDescriptor(TupleDescriptor tuple, TupleDescriptor parent, int catalogNumber, boolean allowsDuplicates, TransactionController tc) Adds a descriptor to a system catalog identified by the catalogNumber. | public void | addDescriptor(TupleDescriptor tuple, TupleDescriptor parent, int catalogNumber, boolean allowsDuplicates, TransactionController tc, boolean wait) Adds a descriptor to a system catalog identified by the catalogNumber. | public void | addDescriptorArray(TupleDescriptor[] tuple, TupleDescriptor parent, int catalogNumber, boolean allowsDuplicates, TransactionController tc) array version of addDescriptor. | public boolean | addRemovePermissionsDescriptor(boolean add, PermissionsDescriptor perm, String grantee, TransactionController tc) Add or remove a permission to the permission database. | public void | addSPSDescriptor(SPSDescriptor descriptor, TransactionController tc, boolean wait) Adds the given SPSDescriptor to the data dictionary,
associated with the given table and constraint type. | public boolean | checkVersion(int majorVersion, String feature) Check to see if a database has been upgraded to the required
level in order to use a langauge feature that is.
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. | public void | clearCaches() Clear all of the DataDictionary caches. | public RowLocation[] | computeAutoincRowLocations(TransactionController tc, TableDescriptor td) returns an array of RowLocations corresponding to
the autoincrement columns in the table. | public void | doneReading(int mode, LanguageConnectionContext lcc) Inform this DataDictionary that we have finished reading it. | public void | dropAliasDescriptor(AliasDescriptor ad, TransactionController tc) | public void | dropAllColumnDescriptors(UUID tableID, TransactionController tc) Drops all column descriptors from the given table. | public void | dropAllConglomerateDescriptors(TableDescriptor td, TransactionController tc) Drops all conglomerates associated with a table. | public void | dropAllConstraintDescriptors(TableDescriptor table, TransactionController tc) Drops all ConstraintDescriptors from the data dictionary
that are associated with the given table. | public void | dropAllRoutinePermDescriptors(UUID routineID, TransactionController tc) Drops all routine permission descriptors for the given routine. | public void | dropAllTableAndColPermDescriptors(UUID tableID, TransactionController tc) Drops all table and column permission descriptors for the given table. | public void | dropColumnDescriptor(UUID tableID, String columnName, TransactionController tc) Given a column name and a table ID, drops the column descriptor
from the table. | public void | dropConglomerateDescriptor(ConglomerateDescriptor conglomerate, TransactionController tc) | public 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. | public void | dropDependentsStoredDependencies(UUID dependentsUUID, TransactionController tc) Remove all of the stored dependencies for a given dependent's ID
from the data dictionary. | public void | dropDependentsStoredDependencies(UUID dependentsUUID, TransactionController tc, boolean wait) Remove all of the stored dependencies for a given dependent's ID
from the data dictionary.
Parameters: dependentsUUID - Dependent's uuid Parameters: tc - TransactionController for the transaction Parameters: wait - If true, then the caller wants to wait for locks. | public void | dropFileInfoDescriptor(FileInfoDescriptor fid) Drop a FileDescriptor from the datadictionary. | public void | dropSPSDescriptor(SPSDescriptor descriptor, TransactionController tc) Drops the given SPSDescriptor. | public void | dropSPSDescriptor(UUID uuid, TransactionController tc) Drops the given SPSDescriptor. | public void | dropSchemaDescriptor(String schemaName, TransactionController tc) | public void | dropStatisticsDescriptors(UUID tableUUID, UUID referenceUUID, TransactionController tc) Drops all statistics descriptors for a given table/index column
combination. | public void | dropStoredDependency(DependencyDescriptor dd, TransactionController tc) Drop a dependency from the data dictionary. | public void | dropTableDescriptor(TableDescriptor td, SchemaDescriptor schema, TransactionController tc) Drop the table descriptor.
Parameters: td - The table descriptor to drop Parameters: schema - A descriptor for the schema the tableis a part of. | public void | dropTriggerDescriptor(TriggerDescriptor descriptor, TransactionController tc) Drops the given TriggerDescriptor that is associated
with the given table and constraint type from the data dictionary. | public void | dropViewDescriptor(ViewDescriptor viewDescriptor, TransactionController tc) Drops the view descriptor from the data dictionary. | public ConstraintDescriptorList | getActiveConstraintDescriptors(ConstraintDescriptorList cdl) Convert a constraint descriptor list into a list
of active constraints, that is, constraints which
must be enforced. | public AliasDescriptor | getAliasDescriptor(UUID uuid) Get an AliasDescriptor given its UUID. | public AliasDescriptor | getAliasDescriptor(String schemaID, String aliasName, char nameSpace) Get a AliasDescriptor by alias name and name space.
NOTE: caller responsible for handling no match.
Parameters: schemaID - schema identifier Parameters: aliasName - The alias name. Parameters: nameSpace - The alias name space. | public List | getAllDependencyDescriptorsList() Build and return an List with DependencyDescriptors for
all of the stored dependencies. | public List | getAllSPSDescriptors() Get every statement in this database. | public String | getAuthorizationDatabaseOwner() | public int | getCacheMode() Returns the cache mode of the data dictionary. | public ColumnDescriptor | getColumnDescriptorByDefaultId(UUID uuid) Get a ColumnDescriptor given its Default ID. | public ColPermsDescriptor | getColumnPermissions(UUID tableUUID, int privType, boolean forGrant, String authorizationId) Get one user's column privileges for a table.
Parameters: tableUUID - Parameters: privType - Authorizer.SELECT_PRIV, Authorizer.UPDATE_PRIV, or Authorizer.REFERENCES_PRIV Parameters: forGrant - Parameters: authorizationId - The user name a ColPermsDescriptor or null if the user has no separate columnpermissions of the specified type on the table. | public ColPermsDescriptor | getColumnPermissions(UUID tableUUID, String privTypeStr, boolean forGrant, String authorizationId) Get one user's column privileges for a table. | public ColPermsDescriptor | getColumnPermissions(UUID colPermsUUID) | public ConglomerateDescriptor | getConglomerateDescriptor(UUID uuid) Get a ConglomerateDescriptor given its UUID. | public ConglomerateDescriptor | getConglomerateDescriptor(long conglomerateNumber) Get a ConglomerateDescriptor given its conglomerate number. | public ConglomerateDescriptor | getConglomerateDescriptor(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.
Parameters: indexName - The name of the index we're looking for Parameters: sd - The schema descriptor Parameters: forUpdate - Whether or not to get an exclusive row lock on the row in sys.sysconglomerates. A ConglomerateDescriptor describing the requestedconglomerate. | public ConglomerateDescriptor[] | getConglomerateDescriptors(UUID uuid) Get an array of ConglomerateDescriptors given the UUID. | public ConglomerateDescriptor[] | getConglomerateDescriptors(long conglomerateNumber) Get an array of conglomerate descriptors for the given conglomerate
number. | public ConstraintDescriptor | getConstraintDescriptor(UUID uuid) Get a ConstraintDescriptor given its UUID. | public ConstraintDescriptor | getConstraintDescriptor(String constraintName, UUID schemaID) Get a ConstraintDescriptor given its name and schema ID. | public ConstraintDescriptor | getConstraintDescriptor(TableDescriptor td, UUID uuid) Get the constraint descriptor given a table and the UUID String
of the backing index.
Parameters: td - The table descriptor. Parameters: uuid - The UUID for the backing index. | public ConstraintDescriptor | getConstraintDescriptorById(TableDescriptor td, UUID uuid) | public ConstraintDescriptor | getConstraintDescriptorByName(TableDescriptor td, SchemaDescriptor sd, String constraintName, boolean forUpdate) Get the constraint descriptor given a TableDescriptor and the constraint name. | public ConstraintDescriptorList | getConstraintDescriptors(TableDescriptor td) Load up the constraint descriptor list for this table
descriptor and return it. | public TableDescriptor | getConstraintTableDescriptor(UUID constraintId) Return a table descriptor corresponding to the TABLEID
field in SYSCONSTRAINTS where CONSTRAINTID matches
the constraintId passed in. | public DataDescriptorGenerator | getDataDescriptorGenerator() Get a DataDescriptorGenerator, through which we can create
objects to be stored in the DataDictionary. | public DataValueFactory | getDataValueFactory() Get the DataValueFactory associated with this database. | public SchemaDescriptor | getDeclaredGlobalTemporaryTablesSchemaDescriptor() Get the descriptor for the declared global temporary table schema which is always named "SESSION". | public DependencyManager | getDependencyManager() Returns the dependency manager for this DataDictionary. | public List | getDependentsDescriptorList(String dependentID) Gets a list of the dependency descriptors for the given dependent's id.
Parameters: dependentID - The ID of the dependent we're interested in List Returns a list of DependencyDescriptors. | public int | getEngineType() | public ExecutionFactory | getExecutionFactory() Get the ExecutionFactory associated with this database. | public FileInfoDescriptor | getFileInfoDescriptor(UUID id) Get a FileInfoDescriptor given its id. | public FileInfoDescriptor | getFileInfoDescriptor(SchemaDescriptor sd, String name) Get a FileInfoDescriptor given its SQL name and
schema name. | public ConstraintDescriptorList | getForeignKeys(UUID constraintId) Return a list of foreign keys constraints referencing
this constraint. | public List | getProvidersDescriptorList(String providerID) Gets a list of the dependency descriptors for the given provider's id.
Parameters: providerID - The ID of the provider we're interested in List Returns a list of DependencyDescriptors. | public java.util.List | getRoutineList(String schemaID, String routineName, char nameSpace) Get the list of routines matching the schema and routine name. | public RoutinePermsDescriptor | getRoutinePermissions(UUID routineUUID, String authorizationId) Get one user's permissions for a routine (function or procedure). | public RoutinePermsDescriptor | getRoutinePermissions(UUID routinePermsUUID) | public RowLocation | getRowLocationTemplate(LanguageConnectionContext lcc, TableDescriptor td) | public SPSDescriptor | getSPSDescriptor(UUID uuid) Get a SPSDescriptor given its UUID. | public SPSDescriptor | getSPSDescriptor(String name, SchemaDescriptor sd) Get the stored prepared statement descriptor given
a sps name.
Parameters: name - The sps name. Parameters: sd - The schema descriptor. | public DataTypeDescriptor[] | getSPSParams(SPSDescriptor spsd, Vector defaults) Get all the parameter descriptors for an SPS.
Look up the params in SYSCOLUMNS and turn them
into parameter descriptors. | public SchemaDescriptor | getSchemaDescriptor(String schemaName, TransactionController tc, boolean raiseError) Get the descriptor for the named schema.
Schema descriptors include authorization ids and schema ids.
SQL92 allows a schema to specify a default character set - we will
not support this. | public SchemaDescriptor | getSchemaDescriptor(UUID schemaId, TransactionController tc) Get the descriptor for the named schema. | public NumberDataValue | getSetAutoincrementValue(RowLocation rl, TransactionController tc, boolean doUpdate, NumberDataValue newValue, boolean wait) getSetAutoincrementValue fetches the autoincrement value from
SYSCOLUMNS given a row location. | public List | getStatisticsDescriptors(TableDescriptor td) Gets all statistics Descriptors for a given table. | public SubKeyConstraintDescriptor | getSubKeyConstraint(UUID constraintId, int type) Get a SubKeyConstraintDescriptor from syskeys or sysforeignkeys for
the specified constraint id. | public SchemaDescriptor | getSysIBMSchemaDescriptor() Get the descriptor for the SYSIBM schema. | public SchemaDescriptor | getSystemDiagSchemaDescriptor() Get the descriptor for the SYSCS_DIAG schema. | public String | getSystemSQLName() | public SchemaDescriptor | getSystemSchemaDescriptor() Get the descriptor for the system schema. | public TableDescriptor | getTableDescriptor(String tableName, SchemaDescriptor schema) Get the descriptor for the named table within the given schema.
If the schema parameter is NULL, it looks for the table in the
current (default) schema. | public TableDescriptor | getTableDescriptor(UUID tableID) Get the descriptor for the table with the given UUID.
NOTE: I'm assuming that the object store will define an UUID for
persistent objects. | public TablePermsDescriptor | getTablePermissions(UUID tableUUID, String authorizationId) | public TablePermsDescriptor | getTablePermissions(UUID tablePermsUUID) | public TriggerDescriptor | getTriggerDescriptor(UUID uuid) Get a TriggerDescriptor given its UUID. | public TriggerDescriptor | getTriggerDescriptor(String name, SchemaDescriptor sd) Get the stored prepared statement descriptor given
a sps name.
Parameters: name - The sps name. Parameters: sd - The schema descriptor. | public GenericDescriptorList | getTriggerDescriptors(TableDescriptor td) Load up the trigger descriptor list for this table
descriptor and return it. | UUIDFactory | getUUIDFactory() Get the UUID Factory. | public String | getVTIClass(TableDescriptor td) Return the Java class to use for the VTI for
the virtual table. | public ViewDescriptor | getViewDescriptor(UUID uuid) Gets the viewDescriptor for the view with the given UUID. | public ViewDescriptor | getViewDescriptor(TableDescriptor td) Gets the viewDescriptor for the view given its TableDescriptor. | public Hashtable | hashAllConglomerateDescriptorsByNumber(TransactionController tc) Get all of the ConglomerateDescriptors in the database and
hash them by conglomerate number. | public 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. | public void | invalidateAllSPSPlans() Invalidate all the stored plans in SYS.SYSSTATEMENTS. | public boolean | isSchemaEmpty(SchemaDescriptor sd) Indicate whether there is anything in the
particular schema. | public boolean | isSystemSchemaName(String name) Determine whether a string is the name of the system schema. | DataDictionaryContext | pushDataDictionaryContext(ContextManager cm) Push a data dictionary context onto the
current context manager. | public void | setAutoincrementValue(TransactionController tc, UUID tableUUID, String columnName, long aiValue, boolean incrementNeeded) sets a new value in SYSCOLUMNS for a particular
autoincrement column. | public int | startReading(LanguageConnectionContext lcc) Inform this DataDictionary that we are about to start reading it. | public void | startWriting(LanguageConnectionContext lcc) Inform this DataDictionary that we are about to start writing to it. | public 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. | public void | updateConglomerateDescriptor(ConglomerateDescriptor[] cds, long conglomerateNumber, TransactionController tc) Update the conglomerateNumber for an array of ConglomerateDescriptors. | public void | updateConglomerateDescriptor(ConglomerateDescriptor cd, long conglomerateNumber, TransactionController tc) Update the conglomerateNumber for a ConglomerateDescriptor. | public void | updateConstraintDescriptor(ConstraintDescriptor cd, UUID formerUUID, int[] colsToSet, TransactionController tc) Update the constraint descriptor in question. | public void | updateLockGranularity(TableDescriptor td, SchemaDescriptor schema, char lockGranularity, TransactionController tc) Update the lockGranularity for the specified table. | public void | updateSPS(SPSDescriptor spsd, TransactionController tc, boolean recompile, boolean updateSYSCOLUMNS, boolean wait, boolean firstCompilation) Updates SYS.SYSSTATEMENTS with the info from the
SPSD. | public void | updateSYSCOLPERMSforAddColumnToUserTable(UUID tableID, TransactionController tc) Need to update SYSCOLPERMS for a given table because a new column has
been added to that table. | public void | updateTriggerDescriptor(TriggerDescriptor triggerd, UUID formerUUID, int[] colsToSet, TransactionController tc) Update the trigger descriptor in question. | public boolean | usesSqlAuthorization() |
CHECK_CONSTRAINT | final public static int CHECK_CONSTRAINT(Code) | | |
COMPILE_ONLY_MODE | final public static int COMPILE_ONLY_MODE(Code) | | Modes returned from startReading()
|
CORE_DATA_DICTIONARY_VERSION | final public static String CORE_DATA_DICTIONARY_VERSION(Code) | | DataDictionaryVersion property indicates the updgrade level of the system catalogs.
Stored as a database property. Set to an instance of DD_Version with
the major number one of the DataDictionary.DD_* values.
|
CREATE_DATA_DICTIONARY_VERSION | final public static String CREATE_DATA_DICTIONARY_VERSION(Code) | | CreateDataDictionaryVersion property indicates the level of the system catalogs,
at the time of database creation.
Stored as a database property. Set to an instance of DD_Version.
|
DDL_MODE | final public static int DDL_MODE(Code) | | |
DD_VERSION_CS_10_0 | final public static int DD_VERSION_CS_10_0(Code) | | Cloudscape/Derby 10.0 (Gandalf) System Catalog version
|
DD_VERSION_CS_5_0 | final public static int DD_VERSION_CS_5_0(Code) | | Cloudscape 5.0 System Catalog version
|
DD_VERSION_CS_5_1 | final public static int DD_VERSION_CS_5_1(Code) | | Cloudscape 5.1 (Arwen) System Catalog version
|
DD_VERSION_CS_5_2 | final public static int DD_VERSION_CS_5_2(Code) | | Cloudscape 5.2 (Frodo) System Catalog version
|
DD_VERSION_CS_8_1 | final public static int DD_VERSION_CS_8_1(Code) | | Cloudscape 8.1 (Pre-Gandalf) System Catalog version
|
DD_VERSION_CURRENT | final public static int DD_VERSION_CURRENT(Code) | | 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. A data dictionary version
will not be at latest System Catalog version when the database is getting
booted in soft upgrade mode. In soft upgrade mode, engine should goto
metadata.properties to get the sql for the metadata calls rather
than going to the system tables (and using stored versions of these queries).
This is required because if the metadata sql has changed between the
releases, we want to use the latest metadata sql rather than what is
stored in the system catalogs. Had to introduce this behavior for
EmbeddedDatabaseMetaData in 10.2 release where optimizer overrides
syntax was changed. If 10.2 engine in soft upgrade mode for a pre-10.2
database went to system tables for stored metadata queires, the metadata
calls would fail because 10.2 release doesn't recognize the pre-10.2
optimizer overrides syntax. To get around this, the 10.2 engine in
soft upgrade mode should get the sql from metata.properties which has
been changed to 10.2 syntax for optimizer overrides. To make this
approach more generic for all soft upgrades, from 10.2 release onwards,
DatabaseMetaData calls will always look at metadata.properties so it
will get the compatible syntax for that release.
|
DD_VERSION_DERBY_10_1 | final public static int DD_VERSION_DERBY_10_1(Code) | | Derby 10.1 System Catalog version
|
DD_VERSION_DERBY_10_2 | final public static int DD_VERSION_DERBY_10_2(Code) | | Derby 10.2 System Catalog version
|
DROP_CONSTRAINT | final public static int DROP_CONSTRAINT(Code) | | |
FOREIGNKEY_CONSTRAINT | final public static int FOREIGNKEY_CONSTRAINT(Code) | | |
NOTNULL_CONSTRAINT | final public static int NOTNULL_CONSTRAINT(Code) | | |
PRIMARYKEY_CONSTRAINT | final public static int PRIMARYKEY_CONSTRAINT(Code) | | |
PROPERTY_CONGLOMERATE_VERSION | final public static String PROPERTY_CONGLOMERATE_VERSION(Code) | | |
SOFT_DATA_DICTIONARY_VERSION | final public static String SOFT_DATA_DICTIONARY_VERSION(Code) | | derby.softDataDictionaryVersion property indicates the soft upgrade level of the system catalogs.
Soft upgrade will sometime make minor changes to the system catalogs that can be safely consumed by
earlier versions, such as correcting values.
Stored as a database property. Set to an instance of DD_Version.
|
SYSALIASES_CATALOG_NUM | final public static int SYSALIASES_CATALOG_NUM(Code) | | |
SYSCHECKS_CATALOG_NUM | final public static int SYSCHECKS_CATALOG_NUM(Code) | | |
SYSCOLPERMS_CATALOG_NUM | final public static int SYSCOLPERMS_CATALOG_NUM(Code) | | |
SYSCOLUMNS_CATALOG_NUM | final public static int SYSCOLUMNS_CATALOG_NUM(Code) | | |
SYSCONGLOMERATES_CATALOG_NUM | final public static int SYSCONGLOMERATES_CATALOG_NUM(Code) | | |
SYSCONSTRAINTS_CATALOG_NUM | final public static int SYSCONSTRAINTS_CATALOG_NUM(Code) | | Catalog numbers for non core system catalogs.
|
SYSDEPENDS_CATALOG_NUM | final public static int SYSDEPENDS_CATALOG_NUM(Code) | | |
SYSDUMMY1_CATALOG_NUM | final public static int SYSDUMMY1_CATALOG_NUM(Code) | | |
SYSFILES_CATALOG_NUM | final public static int SYSFILES_CATALOG_NUM(Code) | | |
SYSFOREIGNKEYS_CATALOG_NUM | final public static int SYSFOREIGNKEYS_CATALOG_NUM(Code) | | |
SYSKEYS_CATALOG_NUM | final public static int SYSKEYS_CATALOG_NUM(Code) | | |
SYSROUTINEPERMS_CATALOG_NUM | final public static int SYSROUTINEPERMS_CATALOG_NUM(Code) | | |
SYSSCHEMAS_CATALOG_NUM | final public static int SYSSCHEMAS_CATALOG_NUM(Code) | | |
SYSSTATEMENTS_CATALOG_NUM | final public static int SYSSTATEMENTS_CATALOG_NUM(Code) | | |
SYSSTATISTICS_CATALOG_NUM | final public static int SYSSTATISTICS_CATALOG_NUM(Code) | | |
SYSTABLEPERMS_CATALOG_NUM | final public static int SYSTABLEPERMS_CATALOG_NUM(Code) | | |
SYSTABLES_CATALOG_NUM | final public static int SYSTABLES_CATALOG_NUM(Code) | | |
SYSTRIGGERS_CATALOG_NUM | final public static int SYSTRIGGERS_CATALOG_NUM(Code) | | |
SYSVIEWS_CATALOG_NUM | final public static int SYSVIEWS_CATALOG_NUM(Code) | | |
UNIQUE_CONSTRAINT | final public static int UNIQUE_CONSTRAINT(Code) | | |
activeConstraint | public boolean activeConstraint(ConstraintDescriptor constraint) throws StandardException(Code) | | Reports whether an individual constraint must be
enforced. For the Core product, this routine always
returns true.
However, during REFRESH we may have deferred some
constraints until statement end. This method returns
false if the constraint deferred
Parameters: constraint - the constraint to check The corresponding Active ConstraintDescriptorList exception: StandardException - Thrown on failure |
addDescriptor | public void addDescriptor(TupleDescriptor tuple, TupleDescriptor parent, int catalogNumber, boolean allowsDuplicates, TransactionController tc) throws StandardException(Code) | | Adds a descriptor to a system catalog identified by the catalogNumber.
Parameters: tuple - descriptor to insert. Parameters: parent - parent descriptor; e.g for a column parent is thetabledescriptor to which the descriptor is beign inserted. for most otherobjects it is the schema descriptor. Parameters: catalogNumber - a value which identifies the catalog into whichthe descriptor should be inserted. It is the users responsibility toensure that the catalogNumber is consistent with the tuple beinginserted. See Also: DataDictionary.SYSCONGLOMERATES_CATALOG_NUM Parameters: allowsDuplicates - whether an exception should be thrown if theinsert results in a duplicate; if this parameter is FALSE then oneof the following exception will be thrown; LANG_OBJECT_ALREADY_EXISTS (ifparent is null) or LANG_OBJECT_ALREADY_EXISTS_IN_OBJECT (if parent is notnull). The error message is created by getting the name and type of thetuple and parent. See Also: org.apache.derby.impl.sql.catalog.DataDictionaryImpl.duplicateDescriptorException Parameters: tc - the transaction controller to use to do all of this. See Also: DataDictionary.addDescriptorArray |
addDescriptor | public void addDescriptor(TupleDescriptor tuple, TupleDescriptor parent, int catalogNumber, boolean allowsDuplicates, TransactionController tc, boolean wait) throws StandardException(Code) | | Adds a descriptor to a system catalog identified by the catalogNumber.
Parameters: tuple - descriptor to insert. Parameters: parent - parent descriptor; e.g for a column parent is thetabledescriptor to which the descriptor is beign inserted. for most otherobjects it is the schema descriptor. Parameters: catalogNumber - a value which identifies the catalog into whichthe descriptor should be inserted. It is the users responsibility toensure that the catalogNumber is consistent with the tuple beinginserted. See Also: DataDictionary.SYSCONGLOMERATES_CATALOG_NUM Parameters: allowsDuplicates - whether an exception should be thrown if theinsert results in a duplicate; if this parameter is FALSE then oneof the following exception will be thrown; LANG_OBJECT_ALREADY_EXISTS (ifparent is null) or LANG_OBJECT_ALREADY_EXISTS_IN_OBJECT (if parent is notnull). The error message is created by getting the name and type of thetuple and parent. See Also: org.apache.derby.impl.sql.catalog.DataDictionaryImpl.duplicateDescriptorException Parameters: tc - the transaction controller to use to do all of this. Parameters: wait - If true, then the caller wants to wait for locks. False willbe when we using a nested user xaction - we want to timeout right away if the parent holds the lock. See Also: DataDictionary.addDescriptorArray |
addRemovePermissionsDescriptor | public boolean addRemovePermissionsDescriptor(boolean add, PermissionsDescriptor perm, String grantee, TransactionController tc) throws StandardException(Code) | | Add or remove a permission to the permission database.
Parameters: add - if true then add the permission, if false remove it. Parameters: perm - Parameters: grantee - Parameters: tc - True means revoke has removed a privilege from systemtable and hence the caller of this method should send invalidation actions to PermssionDescriptor's dependents. |
addSPSDescriptor | public void addSPSDescriptor(SPSDescriptor descriptor, TransactionController tc, boolean wait) throws StandardException(Code) | | Adds the given SPSDescriptor to the data dictionary,
associated with the given table and constraint type.
Parameters: descriptor - The descriptor to add Parameters: tc - The transaction controller Parameters: wait - To wait for lock or not exception: StandardException - Thrown on error |
checkVersion | public boolean checkVersion(int majorVersion, String feature) throws StandardException(Code) | | Check to see if a database has been upgraded to the required
level in order to use a langauge feature that is.
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.
It is not expected that this method would be called at execution time.
Parameters: majorVersion - Data Dictionary major version (DataDictionary.DD_ constant) Parameters: feature - Non-null to throw an error, null to return the state of the version match. True if the database has been upgraded to the required level, false otherwise. |
computeAutoincRowLocations | public RowLocation[] computeAutoincRowLocations(TransactionController tc, TableDescriptor td) throws StandardException(Code) | | returns an array of RowLocations corresponding to
the autoincrement columns in the table. The RowLocation points to the
row in SYSCOLUMNS for this particular ai column.
The array has as many elements as there are columns in the table. If a column
is not an ai column, the entry is NULL.
Parameters: tc - TransactionControler to use to compute the row location. Parameters: td - TableDescriptor array of row locations, null if table has no autoinc columns. exception: standard - exception on error. |
doneReading | public void doneReading(int mode, LanguageConnectionContext lcc) throws StandardException(Code) | | Inform this DataDictionary that we have finished reading it. This
typically happens at the end of compilation.
Parameters: mode - The mode that was returned by startReading(). Parameters: lcc - The LanguageConnectionContext to use. exception: StandardException - Thrown on error |
dropAllColumnDescriptors | public void dropAllColumnDescriptors(UUID tableID, TransactionController tc) throws StandardException(Code) | | Drops all column descriptors from the given table. Useful for
DROP TABLE.
Parameters: tableID - The UUID of the table from which to dropall the column descriptors Parameters: tc - TransactionController for the transaction exception: StandardException - Thrown on failure |
dropAllConstraintDescriptors | public void dropAllConstraintDescriptors(TableDescriptor table, TransactionController tc) throws StandardException(Code) | | Drops all ConstraintDescriptors from the data dictionary
that are associated with the given table.
NOTE: Caller is responsible for dropping any backing index
Parameters: table - The table from which to drop allconstraint descriptors Parameters: tc - The TransactionController. exception: StandardException - Thrown on failure |
dropAllRoutinePermDescriptors | public void dropAllRoutinePermDescriptors(UUID routineID, TransactionController tc) throws StandardException(Code) | | Drops all routine permission descriptors for the given routine.
Parameters: routineID - The UUID of the routine for which to dropall the permission descriptors Parameters: tc - TransactionController for the transaction exception: StandardException - Thrown on failure |
dropAllTableAndColPermDescriptors | public void dropAllTableAndColPermDescriptors(UUID tableID, TransactionController tc) throws StandardException(Code) | | Drops all table and column permission descriptors for the given table.
Parameters: tableID - The UUID of the table for which to dropall the table and column permission descriptors Parameters: tc - TransactionController for the transaction exception: StandardException - Thrown on failure |
dropColumnDescriptor | public void dropColumnDescriptor(UUID tableID, String columnName, TransactionController tc) throws StandardException(Code) | | Given a column name and a table ID, drops the column descriptor
from the table.
Parameters: tableID - The UUID of the table to drop the column from Parameters: columnName - The name of the column to drop Parameters: tc - TransactionController for the transaction exception: StandardException - Thrown on failure |
dropConstraintDescriptor | public void dropConstraintDescriptor(TableDescriptor table, ConstraintDescriptor descriptor, TransactionController tc) throws StandardException(Code) | | Drops the given ConstraintDescriptor that is associated
with the given table and constraint type from the data dictionary.
NOTE: Caller is responsible for dropping any backing index
Parameters: table - The table from which to drop theconstraint descriptor Parameters: descriptor - The descriptor to drop Parameters: tc - The TransactionController. exception: StandardException - Thrown on failure |
dropDependentsStoredDependencies | public void dropDependentsStoredDependencies(UUID dependentsUUID, TransactionController tc) throws StandardException(Code) | | Remove all of the stored dependencies for a given dependent's ID
from the data dictionary.
Parameters: dependentsUUID - Dependent's uuid Parameters: tc - TransactionController for the transaction exception: StandardException - Thrown on failure |
dropDependentsStoredDependencies | public void dropDependentsStoredDependencies(UUID dependentsUUID, TransactionController tc, boolean wait) throws StandardException(Code) | | Remove all of the stored dependencies for a given dependent's ID
from the data dictionary.
Parameters: dependentsUUID - Dependent's uuid Parameters: tc - TransactionController for the transaction Parameters: wait - If true, then the caller wants to wait for locks. False willbe when we using a nested user xaction - we want to timeout right away if the parent holds the lock. exception: StandardException - Thrown on failure |
dropStatisticsDescriptors | public void dropStatisticsDescriptors(UUID tableUUID, UUID referenceUUID, TransactionController tc) throws StandardException(Code) | | Drops all statistics descriptors for a given table/index column
combination. If the index is not specified, then all statistics for the
table are dropped.
Parameters: tableUUID - UUID of the table Parameters: referenceUUID - UUID of the index. This can be null. Parameters: tc - Transcation Controller to use. |
dropTableDescriptor | public void dropTableDescriptor(TableDescriptor td, SchemaDescriptor schema, TransactionController tc) throws StandardException(Code) | | Drop the table descriptor.
Parameters: td - The table descriptor to drop Parameters: schema - A descriptor for the schema the tableis a part of. If this parameter isNULL, then the table is part of thecurrent (default) schema Parameters: tc - TransactionController for the transaction exception: StandardException - Thrown on error |
dropTriggerDescriptor | public void dropTriggerDescriptor(TriggerDescriptor descriptor, TransactionController tc) throws StandardException(Code) | | Drops the given TriggerDescriptor that is associated
with the given table and constraint type from the data dictionary.
Parameters: descriptor - The descriptor to drop Parameters: tc - The TransactionController. exception: StandardException - Thrown on failure |
getActiveConstraintDescriptors | public ConstraintDescriptorList getActiveConstraintDescriptors(ConstraintDescriptorList cdl) throws StandardException(Code) | | Convert a constraint descriptor list into a list
of active constraints, that is, constraints which
must be enforced. For the Core product, these
are just the constraints on the original list.
However, during REFRESH we may have deferred some
constraints until statement end. This method returns
the corresponding list of constraints which AREN'T
deferred.
Parameters: cdl - The constraint descriptor list to wrap withan Active constraint descriptor list. The corresponding Active ConstraintDescriptorList exception: StandardException - Thrown on failure |
getAliasDescriptor | public AliasDescriptor getAliasDescriptor(String schemaID, String aliasName, char nameSpace) throws StandardException(Code) | | Get a AliasDescriptor by alias name and name space.
NOTE: caller responsible for handling no match.
Parameters: schemaID - schema identifier Parameters: aliasName - The alias name. Parameters: nameSpace - The alias name space. AliasDescriptor AliasDescriptor for the alias name and name space exception: StandardException - Thrown on failure |
getAllDependencyDescriptorsList | public List getAllDependencyDescriptorsList() throws StandardException(Code) | | Build and return an List with DependencyDescriptors for
all of the stored dependencies.
This is useful for consistency checking.
List List of all DependencyDescriptors. exception: StandardException - Thrown on failure |
getAllSPSDescriptors | public List getAllSPSDescriptors() throws StandardException(Code) | | Get every statement in this database.
Return the SPSDescriptors in an list.
the list of descriptors exception: StandardException - Thrown on failure |
getAuthorizationDatabaseOwner | public String getAuthorizationDatabaseOwner()(Code) | | Get authorizationID of Database Owner
authorizationID |
getCacheMode | public int getCacheMode()(Code) | | Returns the cache mode of the data dictionary.
|
getColumnPermissions | public ColPermsDescriptor getColumnPermissions(UUID tableUUID, int privType, boolean forGrant, String authorizationId) throws StandardException(Code) | | Get one user's column privileges for a table.
Parameters: tableUUID - Parameters: privType - Authorizer.SELECT_PRIV, Authorizer.UPDATE_PRIV, or Authorizer.REFERENCES_PRIV Parameters: forGrant - Parameters: authorizationId - The user name a ColPermsDescriptor or null if the user has no separate columnpermissions of the specified type on the table. Note that the user may have been grantedpermission on all the columns of the table (no column list), in which case this routinewill return null. You must also call getTablePermissions to see if the user has permissionon a set of columns. exception: StandardException - |
getColumnPermissions | public ColPermsDescriptor getColumnPermissions(UUID tableUUID, String privTypeStr, boolean forGrant, String authorizationId) throws StandardException(Code) | | Get one user's column privileges for a table. This routine gets called
during revoke privilege processing
Parameters: tableUUID - Parameters: privTypeStr - (as String) Authorizer.SELECT_PRIV, Authorizer.UPDATE_PRIV, or Authorizer.REFERENCES_PRIV Parameters: forGrant - Parameters: authorizationId - The user name a ColPermsDescriptor or null if the user has no separate columnpermissions of the specified type on the table. Note that the user may have been grantedpermission on all the columns of the table (no column list), in which case this routinewill return null. You must also call getTablePermissions to see if the user has permissionon a set of columns. exception: StandardException - |
getConglomerateDescriptor | public ConglomerateDescriptor getConglomerateDescriptor(UUID uuid) throws StandardException(Code) | | Get a ConglomerateDescriptor given its UUID. If it is an index
conglomerate shared by at least another duplicate index, this returns
one of the ConglomerateDescriptors for those indexes.
Parameters: uuid - The UUID A ConglomerateDescriptor for the conglomerate. exception: StandardException - Thrown on failure |
getConglomerateDescriptor | public ConglomerateDescriptor getConglomerateDescriptor(long conglomerateNumber) throws StandardException(Code) | | Get a ConglomerateDescriptor given its conglomerate number. If it is an
index conglomerate shared by at least another duplicate index, this
returns one of the ConglomerateDescriptors for those indexes.
Parameters: conglomerateNumber - The conglomerate number. A ConglomerateDescriptor for the conglomerate. Returns NULL ifno such conglomerate. exception: StandardException - Thrown on failure |
getConglomerateDescriptor | public ConglomerateDescriptor getConglomerateDescriptor(String indexName, SchemaDescriptor sd, boolean forUpdate) throws StandardException(Code) | | 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.
Parameters: indexName - The name of the index we're looking for Parameters: sd - The schema descriptor Parameters: forUpdate - Whether or not to get an exclusive row lock on the row in sys.sysconglomerates. A ConglomerateDescriptor describing the requestedconglomerate. Returns NULL if no such conglomerate. exception: StandardException - Thrown on failure |
getConglomerateDescriptors | public ConglomerateDescriptor[] getConglomerateDescriptors(UUID uuid) throws StandardException(Code) | | Get an array of ConglomerateDescriptors given the UUID. If it is a
heap conglomerate or an index conglomerate not shared by a duplicate
index, the size of the return array is 1.
Parameters: uuid - The UUID An array of ConglomerateDescriptors for the conglomerate. exception: StandardException - Thrown on failure |
getConglomerateDescriptors | public ConglomerateDescriptor[] getConglomerateDescriptors(long conglomerateNumber) throws StandardException(Code) | | Get an array of conglomerate descriptors for the given conglomerate
number. If it is a heap conglomerate or an index conglomerate not
shared by a duplicate index, the size of the return array is 1.
Parameters: conglomerateNumber - The number for the conglomeratewe're interested in An array of ConglomerateDescriptors that share the requestedconglomerate. Returns size 0 array if no such conglomerate. exception: StandardException - Thrown on failure |
getConstraintDescriptor | public ConstraintDescriptor getConstraintDescriptor(String constraintName, UUID schemaID) throws StandardException(Code) | | Get a ConstraintDescriptor given its name and schema ID.
Parameters: constraintName - Constraint name. Parameters: schemaID - The schema UUID The ConstraintDescriptor for the constraint. exception: StandardException - Thrown on failure |
getConstraintDescriptor | public ConstraintDescriptor getConstraintDescriptor(TableDescriptor td, UUID uuid) throws StandardException(Code) | | Get the constraint descriptor given a table and the UUID String
of the backing index.
Parameters: td - The table descriptor. Parameters: uuid - The UUID for the backing index. The ConstraintDescriptor for the constraint. exception: StandardException - Thrown on failure |
getConstraintDescriptorById | public ConstraintDescriptor getConstraintDescriptorById(TableDescriptor td, UUID uuid) throws StandardException(Code) | | Get the constraint descriptor given a table and the UUID String
of the constraint
Parameters: td - The table descriptor. Parameters: uuid - The UUID for the constraint The ConstraintDescriptor for the constraint. exception: StandardException - Thrown on failure |
getConstraintDescriptorByName | public ConstraintDescriptor getConstraintDescriptorByName(TableDescriptor td, SchemaDescriptor sd, String constraintName, boolean forUpdate) throws StandardException(Code) | | Get the constraint descriptor given a TableDescriptor and the constraint name.
Parameters: td - The table descriptor. Parameters: sd - The schema descriptor for the constraint Parameters: constraintName - The constraint name. Parameters: forUpdate - Whether or not access is for update The ConstraintDescriptor for the constraint. exception: StandardException - Thrown on failure |
getConstraintDescriptors | public ConstraintDescriptorList getConstraintDescriptors(TableDescriptor td) throws StandardException(Code) | | Load up the constraint descriptor list for this table
descriptor and return it. If the descriptor list
is already loaded up, it is retuned without further
ado.
Parameters: td - The table descriptor. The ConstraintDescriptorList for the table exception: StandardException - Thrown on failure |
getConstraintTableDescriptor | public TableDescriptor getConstraintTableDescriptor(UUID constraintId) throws StandardException(Code) | | Return a table descriptor corresponding to the TABLEID
field in SYSCONSTRAINTS where CONSTRAINTID matches
the constraintId passed in.
Parameters: constraintId - The id of the constraint the corresponding table descriptor exception: StandardException - Thrown on error |
getDataDescriptorGenerator | public DataDescriptorGenerator getDataDescriptorGenerator()(Code) | | Get a DataDescriptorGenerator, through which we can create
objects to be stored in the DataDictionary.
A DataDescriptorGenerator |
getDataValueFactory | public DataValueFactory getDataValueFactory()(Code) | | Get the DataValueFactory associated with this database.
The ExecutionFactory |
getDeclaredGlobalTemporaryTablesSchemaDescriptor | public SchemaDescriptor getDeclaredGlobalTemporaryTablesSchemaDescriptor() throws StandardException(Code) | | Get the descriptor for the declared global temporary table schema which is always named "SESSION".
SQL92 allows a schema to specify a default character set - we will
not support this.
The descriptor for the schema. exception: StandardException - Thrown on failure |
getDependentsDescriptorList | public List getDependentsDescriptorList(String dependentID) throws StandardException(Code) | | Gets a list of the dependency descriptors for the given dependent's id.
Parameters: dependentID - The ID of the dependent we're interested in List Returns a list of DependencyDescriptors. Returns an empty list if no stored dependencies for thedependent's ID. exception: StandardException - Thrown on failure |
getEngineType | public int getEngineType()(Code) | | |
getExecutionFactory | public ExecutionFactory getExecutionFactory()(Code) | | Get the ExecutionFactory associated with this database.
The ExecutionFactory |
getForeignKeys | public ConstraintDescriptorList getForeignKeys(UUID constraintId) throws StandardException(Code) | | Return a list of foreign keys constraints referencing
this constraint. Returns both enabled and disabled
constraints.
Parameters: constraintId - The id of the referenced constraint list of constraints exception: StandardException - Thrown on error |
getProvidersDescriptorList | public List getProvidersDescriptorList(String providerID) throws StandardException(Code) | | Gets a list of the dependency descriptors for the given provider's id.
Parameters: providerID - The ID of the provider we're interested in List Returns a list of DependencyDescriptors. Returns an empty List if no stored dependencies for theprovider's ID. exception: StandardException - Thrown on failure |
getRoutinePermissions | public RoutinePermsDescriptor getRoutinePermissions(UUID routineUUID, String authorizationId) throws StandardException(Code) | | Get one user's permissions for a routine (function or procedure).
Parameters: routineUUID - Parameters: authorizationId - The user's name The descriptor of the users permissions for the routine. exception: StandardException - |
getSPSParams | public DataTypeDescriptor[] getSPSParams(SPSDescriptor spsd, Vector defaults) throws StandardException(Code) | | Get all the parameter descriptors for an SPS.
Look up the params in SYSCOLUMNS and turn them
into parameter descriptors.
Parameters: spsd - sps descriptor Parameters: defaults - the parameter defaults. If not null,all the parameter defaults will be stuffedin here. array of data type descriptors exception: StandardException - Thrown on error |
getSchemaDescriptor | public SchemaDescriptor getSchemaDescriptor(String schemaName, TransactionController tc, boolean raiseError) throws StandardException(Code) | | Get the descriptor for the named schema.
Schema descriptors include authorization ids and schema ids.
SQL92 allows a schema to specify a default character set - we will
not support this. Will check default schema for a match
before scanning a system table.
Parameters: schemaName - The name of the schema we're interested in. Must not be null. Parameters: tc - TransactionController Parameters: raiseError - whether an exception should be thrown if the schema does not exist. The descriptor for the schema. Can be null (not found) if raiseError is false. exception: StandardException - Thrown on error |
getSchemaDescriptor | public SchemaDescriptor getSchemaDescriptor(UUID schemaId, TransactionController tc) throws StandardException(Code) | | Get the descriptor for the named schema. If the schemaId
parameter is NULL, it gets the descriptor for the current (default)
schema. Schema descriptors include authorization ids and schema ids.
SQL92 allows a schema to specify a default character set - we will
not support this.
Parameters: schemaId - The id of the schema we're interested in.If the name is NULL, get the descriptor for thecurrent schema. Parameters: tc - The transaction controller to us when scanningSYSSCHEMAS The descriptor for the schema. exception: StandardException - Thrown on failure |
getSetAutoincrementValue | public NumberDataValue getSetAutoincrementValue(RowLocation rl, TransactionController tc, boolean doUpdate, NumberDataValue newValue, boolean wait) throws StandardException(Code) | | getSetAutoincrementValue fetches the autoincrement value from
SYSCOLUMNS given a row location. If doUpdate is true it updates
the autoincrement column with the new value.
the value returned by this routine is the new value and *NOT* the
value in the system catalogs.
Parameters: rl - RowLocation of the entry in SYSCOLUMNS. Parameters: tc - TransactionController to use. Parameters: doUpdate - Write the new value to disk if TRUE. Parameters: newValue - A NumberDataValue to use to return incremented value. Ifnull, then the caller simply wants the current value fromd disk. Parameters: wait - If true, then the caller wants to wait for locks. Whenusing a nested user xaction we want to timeout right away if the parentholds the lock. |
getSubKeyConstraint | public SubKeyConstraintDescriptor getSubKeyConstraint(UUID constraintId, int type) throws StandardException(Code) | | Get a SubKeyConstraintDescriptor from syskeys or sysforeignkeys for
the specified constraint id. For primary foreign and and unique
key constraints.
Parameters: constraintId - The UUID for the constraint. Parameters: type - The type of the constraint (e.g. DataDictionary.FOREIGNKEY_CONSTRAINT) SubKeyConstraintDescriptor The Sub descriptor for the constraint. exception: StandardException - Thrown on failure |
getSysIBMSchemaDescriptor | public SchemaDescriptor getSysIBMSchemaDescriptor() throws StandardException(Code) | | Get the descriptor for the SYSIBM schema. Schema descriptors include
authorization ids and schema ids.
SQL92 allows a schema to specify a default character set - we will
not support this.
The descriptor for the schema. exception: StandardException - Thrown on failure |
getSystemDiagSchemaDescriptor | public SchemaDescriptor getSystemDiagSchemaDescriptor() throws StandardException(Code) | | Get the descriptor for the SYSCS_DIAG schema. Schema descriptors
include authorization ids and schema ids.
SQL92 allows a schema to specify a default character set - we will
not support this.
The descriptor for the schema. exception: StandardException - Thrown on failure |
getSystemSQLName | public String getSystemSQLName()(Code) | | 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
system generated unique name |
getSystemSchemaDescriptor | public SchemaDescriptor getSystemSchemaDescriptor() throws StandardException(Code) | | Get the descriptor for the system schema. Schema descriptors include
authorization ids and schema ids.
SQL92 allows a schema to specify a default character set - we will
not support this.
The descriptor for the schema. exception: StandardException - Thrown on failure |
getTableDescriptor | public TableDescriptor getTableDescriptor(String tableName, SchemaDescriptor schema) throws StandardException(Code) | | Get the descriptor for the named table within the given schema.
If the schema parameter is NULL, it looks for the table in the
current (default) schema. Table descriptors include object ids,
object types (table, view, etc.)
Parameters: tableName - The name of the table to get the descriptor for Parameters: schema - The descriptor for the schema the table lives in.If null, use the current (default) schema. The descriptor for the table, null if table does notexiste. exception: StandardException - Thrown on failure |
getTableDescriptor | public TableDescriptor getTableDescriptor(UUID tableID) throws StandardException(Code) | | Get the descriptor for the table with the given UUID.
NOTE: I'm assuming that the object store will define an UUID for
persistent objects. I'm also assuming that UUIDs are unique across
schemas, and that the object store will be able to do efficient
lookups across schemas (i.e. that no schema descriptor parameter
is needed).
Parameters: tableID - The UUID of the table to get the descriptor for The descriptor for the table, null if the table doesnot exist. exception: StandardException - Thrown on failure |
getTablePermissions | public TablePermsDescriptor getTablePermissions(UUID tableUUID, String authorizationId) throws StandardException(Code) | | Get one user's privileges on a table using tableUUID and authorizationid
Parameters: tableUUID - Parameters: authorizationId - The user name a TablePermsDescriptor or null if the user has no permissions on the table. exception: StandardException - |
getTriggerDescriptors | public GenericDescriptorList getTriggerDescriptors(TableDescriptor td) throws StandardException(Code) | | Load up the trigger descriptor list for this table
descriptor and return it. If the descriptor list
is already loaded up, it is retuned without further
ado.
Parameters: td - The table descriptor. The ConstraintDescriptorList for the table exception: StandardException - Thrown on failure |
getUUIDFactory | UUIDFactory getUUIDFactory()(Code) | | Get the UUID Factory. (No need to make the UUIDFactory a module.)
UUIDFactory The UUID Factory for this DataDictionary. |
hashAllConglomerateDescriptorsByNumber | public Hashtable hashAllConglomerateDescriptorsByNumber(TransactionController tc) throws StandardException(Code) | | Get all of the ConglomerateDescriptors in the database and
hash them by conglomerate number.
This is useful as a performance optimization for the locking VTIs.
NOTE: This method will scan SYS.SYSCONGLOMERATES at READ COMMITTED.
It should really scan at READ UNCOMMITTED, but there is no such
thing yet.
Parameters: tc - TransactionController for the transaction A Hashtable with all of the ConglomerateDescriptorsin the database hashed by conglomerate number. exception: StandardException - Thrown on failure |
hashAllTableDescriptorsByTableId | public Hashtable hashAllTableDescriptorsByTableId(TransactionController tc) throws StandardException(Code) | | Get all of the TableDescriptors in the database and hash them by TableId
This is useful as a performance optimization for the locking VTIs.
NOTE: This method will scan SYS.SYSTABLES at READ COMMITTED.
It should really scan at READ UNCOMMITTED, but there is no such
thing yet.
Parameters: tc - TransactionController for the transaction A Hashtable with all of the Table descriptors in the databasehashed by TableId exception: StandardException - Thrown on failure |
isSchemaEmpty | public boolean isSchemaEmpty(SchemaDescriptor sd) throws StandardException(Code) | | Indicate whether there is anything in the
particular schema. Checks for tables in the
the schema, on the assumption that there cannot
be any other objects in a schema w/o a table.
Parameters: sd - schema descriptor true/false exception: StandardException - on error |
isSystemSchemaName | public boolean isSystemSchemaName(String name) throws StandardException(Code) | | Determine whether a string is the name of the system schema.
Parameters: name - true or false exception: StandardException - Thrown on failure |
setAutoincrementValue | public void setAutoincrementValue(TransactionController tc, UUID tableUUID, String columnName, long aiValue, boolean incrementNeeded) throws StandardException(Code) | | sets a new value in SYSCOLUMNS for a particular
autoincrement column.
Parameters: tc - Transaction Controller to use. Parameters: tableUUID - Table Descriptor Parameters: columnName - Name of the column. Parameters: aiValue - Value to write to SYSCOLUMNS. Parameters: incrementNeeded - Whether we should increment the value passed in bythe user (aiValue) before writing the value to SYSCOLUMNS. |
startReading | public int startReading(LanguageConnectionContext lcc) throws StandardException(Code) | | Inform this DataDictionary that we are about to start reading it. This
means using the various get methods in the DataDictionary.
Generally, this is done during query compilation.
Parameters: lcc - The LanguageConnectionContext to use. The mode that the reader will use, to be passed to doneReading()Either COMPILE_ONLY_MODE or DDL_MODE. exception: StandardException - Thrown on error |
startWriting | public void startWriting(LanguageConnectionContext lcc) throws StandardException(Code) | | Inform this DataDictionary that we are about to start writing to it.
This means using the various add and drop methods in the DataDictionary.
Generally, this is done during execution of DDL.
Parameters: lcc - The LanguageConnectionContext to use. exception: StandardException - Thrown on error |
transactionFinished | public void transactionFinished() throws StandardException(Code) | | Inform this DataDictionary that the transaction in which writes have
been done (or may have been done) has been committed or rolled back.
exception: StandardException - Thrown on error |
updateConglomerateDescriptor | public void updateConglomerateDescriptor(ConglomerateDescriptor[] cds, long conglomerateNumber, TransactionController tc) throws StandardException(Code) | | Update the conglomerateNumber for an array of ConglomerateDescriptors.
In case of more than one ConglomerateDescriptor, they are for duplicate
indexes sharing one conglomerate.
This is useful, in 1.3, when doing a bulkInsert into an
empty table where we insert into a new conglomerate.
(This will go away in 1.4.)
Parameters: cds - The array of ConglomerateDescriptors Parameters: conglomerateNumber - The new conglomerate number Parameters: tc - The TransactionController to use exception: StandardException - Thrown on failure |
updateConglomerateDescriptor | public void updateConglomerateDescriptor(ConglomerateDescriptor cd, long conglomerateNumber, TransactionController tc) throws StandardException(Code) | | Update the conglomerateNumber for a ConglomerateDescriptor.
This is useful, in 1.3, when doing a bulkInsert into an
empty table where we insert into a new conglomerate.
(This will go away in 1.4.)
Parameters: cd - The ConglomerateDescriptor Parameters: conglomerateNumber - The new conglomerate number Parameters: tc - The TransactionController to use exception: StandardException - Thrown on failure |
updateConstraintDescriptor | public void updateConstraintDescriptor(ConstraintDescriptor cd, UUID formerUUID, int[] colsToSet, TransactionController tc) throws StandardException(Code) | | Update the constraint descriptor in question. Updates
every row in the base conglomerate.
Parameters: cd - The Constraintescriptor Parameters: formerUUID - The UUID for this column in SYSCONSTRAINTS,may differ from what is in cd if thisis the column that is being set. Parameters: colsToSet - Array of ints of columns to be modified,1 based. May be null (all cols). Parameters: tc - The TransactionController to use exception: StandardException - Thrown on failure |
updateLockGranularity | public void updateLockGranularity(TableDescriptor td, SchemaDescriptor schema, char lockGranularity, TransactionController tc) throws StandardException(Code) | | Update the lockGranularity for the specified table.
Parameters: td - The TableDescriptor for the table Parameters: schema - The SchemaDescriptor for the table Parameters: lockGranularity - The new lockGranularity Parameters: tc - The TransactionController to use. exception: StandardException - Thrown on error |
updateSPS | public void updateSPS(SPSDescriptor spsd, TransactionController tc, boolean recompile, boolean updateSYSCOLUMNS, boolean wait, boolean firstCompilation) throws StandardException(Code) | | Updates SYS.SYSSTATEMENTS with the info from the
SPSD.
Parameters: spsd - The descriptor to add Parameters: tc - The transaction controller Parameters: recompile - whether to recompile or invalidate Parameters: updateSYSCOLUMNS - indicate whether syscolumns needs to be updatedor not. Parameters: wait - If true, then the caller wants to wait for locks. False will be Parameters: firstCompilation - first time SPS is getting compiled.when we using a nested user xaction - we want to timeout right away ifthe parent holds the lock. (bug 4821) exception: StandardException - Thrown on error |
updateSYSCOLPERMSforAddColumnToUserTable | public void updateSYSCOLPERMSforAddColumnToUserTable(UUID tableID, TransactionController tc) throws StandardException(Code) | | Need to update SYSCOLPERMS for a given table because a new column has
been added to that table. SYSCOLPERMS has a column called "COLUMNS"
which is a bit map for all the columns in a given user table. Since
ALTER TABLE .. ADD COLUMN .. has added one more column, we need to
expand "COLUMNS" for that new column
Currently, this code gets called during execution phase of
ALTER TABLE .. ADD COLUMN ..
Parameters: tableID - The UUID of the table to which a column has been added Parameters: tc - TransactionController for the transaction exception: StandardException - Thrown on error |
updateTriggerDescriptor | public void updateTriggerDescriptor(TriggerDescriptor triggerd, UUID formerUUID, int[] colsToSet, TransactionController tc) throws StandardException(Code) | | Update the trigger descriptor in question. Updates
every row in the base conglomerate.
Parameters: triggerd - The Triggerescriptor Parameters: formerUUID - The UUID for this column in SYSTRIGGERS,may differ from what is in triggerd if thisis the column that is being set. Parameters: colsToSet - Array of ints of columns to be modified,1 based. May be null (all cols). Parameters: tc - The TransactionController to use exception: StandardException - Thrown on failure |
usesSqlAuthorization | public boolean usesSqlAuthorization()(Code) | | Get authorization model in force, SqlStandard or legacy mode
Whether sqlAuthorization is being used |
|
|