Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.derby.iapi.sql.dictionary
Interface DataDictionary  view DataDictionary download DataDictionary.java


public interface DataDictionary

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

Field Summary
static int CHECK_CONSTRAINT
           
static int COMPILE_ONLY_MODE
          Modes returned from startReading()
static java.lang.String CORE_DATA_DICTIONARY_VERSION
          DataDictionaryVersion property indicates the updgrade level of the system catalogs.
static java.lang.String CREATE_DATA_DICTIONARY_VERSION
          CreateDataDictionaryVersion property indicates the level of the system catalogs, at the time of database creation.
static java.lang.String DATABASE_ID
           
static int DD_VERSION_CS_10_0
          Cloudscape/Derby 10.0 (Gandalf) System Catalog version
static int DD_VERSION_CS_5_0
          Cloudscape 5.0 System Catalog version
static int DD_VERSION_CS_5_1
          Cloudscape 5.1 (Arwen) System Catalog version
static int DD_VERSION_CS_5_2
          Cloudscape 5.2 (Frodo) System Catalog version
static int DD_VERSION_CS_8_1
          Cloudscape 8.1 (Pre-Gandalf) System Catalog version
static int DD_VERSION_CURRENT
          Special version indicating the database must be upgraded to or created at the current engine level
static int DD_VERSION_DERBY_10_1
          Derby 10.1 System Catalog version
static int DDL_MODE
           
static int DROP_CONSTRAINT
           
static int FOREIGNKEY_CONSTRAINT
           
static java.lang.String MODULE
           
static int NOTNULL_CONSTRAINT
           
static int PRIMARYKEY_CONSTRAINT
           
static java.lang.String PROPERTY_CONGLOMERATE_VERSION
           
static java.lang.String SOFT_DATA_DICTIONARY_VERSION
          derby.softDataDictionaryVersion property indicates the soft upgrade level of the system catalogs.
static int SYSALIASES_CATALOG_NUM
           
static int SYSCHECKS_CATALOG_NUM
           
static int SYSCOLUMNS_CATALOG_NUM
           
static int SYSCONGLOMERATES_CATALOG_NUM
           
static int SYSCONSTRAINTS_CATALOG_NUM
          Catalog numbers for non core system catalogs.
static int SYSDEPENDS_CATALOG_NUM
           
static int SYSDUMMY1_CATALOG_NUM
           
static int SYSFILES_CATALOG_NUM
           
static int SYSFOREIGNKEYS_CATALOG_NUM
           
static int SYSKEYS_CATALOG_NUM
           
static int SYSSCHEMAS_CATALOG_NUM
           
static int SYSSTATEMENTS_CATALOG_NUM
           
static int SYSSTATISTICS_CATALOG_NUM
           
static int SYSTABLES_CATALOG_NUM
           
static int SYSTRIGGERS_CATALOG_NUM
           
static int SYSVIEWS_CATALOG_NUM
           
static int UNIQUE_CONSTRAINT
           
 
Method Summary
 boolean activeConstraint(ConstraintDescriptor constraint)
          Reports whether an individual constraint must be enforced.
 void addConstraintDescriptor(ConstraintDescriptor descriptor, org.apache.derby.iapi.store.access.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, org.apache.derby.iapi.store.access.TransactionController tc)
          Adds a descriptor to a system catalog identified by the catalogNumber.
 void addDescriptorArray(TupleDescriptor[] tuple, TupleDescriptor parent, int catalogNumber, boolean allowsDuplicates, org.apache.derby.iapi.store.access.TransactionController tc)
          array version of addDescriptor.
 void addSPSDescriptor(SPSDescriptor descriptor, org.apache.derby.iapi.store.access.TransactionController tc, boolean wait)
          Adds the given SPSDescriptor to the data dictionary, associated with the given table and constraint type.
 boolean checkVersion(int majorVersion, java.lang.String feature)
          Check to see if a database has been upgraded to the required level in order to use a langauge feature that is.
 void clearCaches()
          Clear all of the DataDictionary caches.
 org.apache.derby.iapi.types.RowLocation[] computeAutoincRowLocations(org.apache.derby.iapi.store.access.TransactionController tc, TableDescriptor td)
          returns an array of RowLocations corresponding to the autoincrement columns in the table.
 void doneReading(int mode, org.apache.derby.iapi.sql.conn.LanguageConnectionContext lcc)
          Inform this DataDictionary that we have finished reading it.
 void dropAliasDescriptor(AliasDescriptor ad, org.apache.derby.iapi.store.access.TransactionController tc)
          Drop an AliasDescriptor from the DataDictionary
 void dropAllColumnDescriptors(org.apache.derby.catalog.UUID tableID, org.apache.derby.iapi.store.access.TransactionController tc)
          Drops all column descriptors from the given table.
 void dropAllConglomerateDescriptors(TableDescriptor td, org.apache.derby.iapi.store.access.TransactionController tc)
          Drops all conglomerates associated with a table.
 void dropAllConstraintDescriptors(TableDescriptor table, org.apache.derby.iapi.store.access.TransactionController tc)
          Drops all ConstraintDescriptors from the data dictionary that are associated with the given table.
 void dropColumnDescriptor(org.apache.derby.catalog.UUID tableID, java.lang.String columnName, org.apache.derby.iapi.store.access.TransactionController tc)
          Given a column name and a table ID, drops the column descriptor from the table.
 void dropConglomerateDescriptor(ConglomerateDescriptor conglomerate, org.apache.derby.iapi.store.access.TransactionController tc)
          Drops a conglomerate descriptor
 void dropConstraintDescriptor(TableDescriptor table, ConstraintDescriptor descriptor, org.apache.derby.iapi.store.access.TransactionController tc)
          Drops the given ConstraintDescriptor that is associated with the given table and constraint type from the data dictionary.
 void dropDependentsStoredDependencies(org.apache.derby.catalog.UUID dependentsUUID, org.apache.derby.iapi.store.access.TransactionController tc)
          Remove all of the stored dependencies for a given dependent's ID from the data dictionary.
 void dropFileInfoDescriptor(FileInfoDescriptor fid)
          Drop a FileDescriptor from the datadictionary.
 void dropSchemaDescriptor(java.lang.String schemaName, org.apache.derby.iapi.store.access.TransactionController tc)
          Drop the descriptor for a schema, given the schema's name
 void dropSPSDescriptor(SPSDescriptor descriptor, org.apache.derby.iapi.store.access.TransactionController tc)
          Drops the given SPSDescriptor.
 void dropSPSDescriptor(org.apache.derby.catalog.UUID uuid, org.apache.derby.iapi.store.access.TransactionController tc)
          Drops the given SPSDescriptor.
 void dropStatisticsDescriptors(org.apache.derby.catalog.UUID tableUUID, org.apache.derby.catalog.UUID referenceUUID, org.apache.derby.iapi.store.access.TransactionController tc)
          Drops all statistics descriptors for a given table/index column combination.
 void dropStoredDependency(DependencyDescriptor dd, org.apache.derby.iapi.store.access.TransactionController tc)
          Drop a dependency from the data dictionary.
 void dropTableDescriptor(TableDescriptor td, SchemaDescriptor schema, org.apache.derby.iapi.store.access.TransactionController tc)
          Drop the table descriptor.
 void dropTriggerDescriptor(TriggerDescriptor descriptor, org.apache.derby.iapi.store.access.TransactionController tc)
          Drops the given TriggerDescriptor that is associated with the given table and constraint type from the data dictionary.
 void dropViewDescriptor(ViewDescriptor viewDescriptor, org.apache.derby.iapi.store.access.TransactionController tc)
          Drops the view descriptor from the data dictionary.
 ConstraintDescriptorList getActiveConstraintDescriptors(ConstraintDescriptorList cdl)
          Convert a constraint descriptor list into a list of active constraints, that is, constraints which must be enforced.
 AliasDescriptor getAliasDescriptor(java.lang.String schemaID, java.lang.String aliasName, char nameSpace)
          Get a AliasDescriptor by alias name and name space.
 AliasDescriptor getAliasDescriptor(org.apache.derby.catalog.UUID uuid)
          Get an AliasDescriptor given its UUID.
 java.util.List getAllDependencyDescriptorsList()
          Build and return an List with DependencyDescriptors for all of the stored dependencies.
 java.util.List getAllSPSDescriptors()
          Get every statement in this database.
 int getCacheMode()
          Returns the cache mode of the data dictionary.
 ColumnDescriptor getColumnDescriptorByDefaultId(org.apache.derby.catalog.UUID uuid)
          Get a ColumnDescriptor given its Default ID.
 ConglomerateDescriptor getConglomerateDescriptor(long conglomerateNumber)
          Get a ConglomerateDescriptor given its conglomerate number.
 ConglomerateDescriptor getConglomerateDescriptor(java.lang.String indexName, SchemaDescriptor sd, boolean forUpdate)
          Gets a conglomerate descriptor for the named index in the given schema, getting an exclusive row lock on the matching row in sys.sysconglomerates (for DDL concurrency) if requested.
 ConglomerateDescriptor getConglomerateDescriptor(org.apache.derby.catalog.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(org.apache.derby.catalog.UUID uuid)
          Get an array of ConglomerateDescriptors given the UUID.
 ConstraintDescriptor getConstraintDescriptor(java.lang.String constraintName, org.apache.derby.catalog.UUID schemaID)
          Get a ConstraintDescriptor given its name and schema ID.
 ConstraintDescriptor getConstraintDescriptor(TableDescriptor td, org.apache.derby.catalog.UUID uuid)
          Get the constraint descriptor given a table and the UUID String of the backing index.
 ConstraintDescriptor getConstraintDescriptor(org.apache.derby.catalog.UUID uuid)
          Get a ConstraintDescriptor given its UUID.
 ConstraintDescriptor getConstraintDescriptorById(TableDescriptor td, org.apache.derby.catalog.UUID uuid)
          Get the constraint descriptor given a table and the UUID String of the constraint
 ConstraintDescriptor getConstraintDescriptorByName(TableDescriptor td, SchemaDescriptor sd, java.lang.String constraintName, boolean forUpdate)
          Get the constraint descriptor given a TableDescriptor and the constraint name.
 ConstraintDescriptorList getConstraintDescriptors(TableDescriptor td)
          Load up the constraint descriptor list for this table descriptor and return it.
 TableDescriptor getConstraintTableDescriptor(org.apache.derby.catalog.UUID constraintId)
          Return a table descriptor corresponding to the TABLEID field in SYSCONSTRAINTS where CONSTRAINTID matches the constraintId passsed in.
 TabInfo getCoreCatalog(int coreNum)
          Get core catalog info.
 DataDescriptorGenerator getDataDescriptorGenerator()
          Get a DataDescriptorGenerator, through which we can create objects to be stored in the DataDictionary.
 org.apache.derby.iapi.types.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".
 org.apache.derby.iapi.sql.depend.DependencyManager getDependencyManager()
          Returns the dependency manager for this DataDictionary.
 java.util.List getDependentsDescriptorList(java.lang.String dependentID)
          Gets a list of the dependency descriptors for the given dependent's id.
 int getEngineType()
           
 org.apache.derby.iapi.sql.execute.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(org.apache.derby.catalog.UUID id)
          Get a FileInfoDescriptor given its id.
 ConstraintDescriptorList getForeignKeys(org.apache.derby.catalog.UUID constraintId)
          Return a list of foreign keys constraints referencing this constraint.
 java.util.List getProvidersDescriptorList(java.lang.String providerID)
          Gets a list of the dependency descriptors for the given provider's id.
 java.util.List getRoutineList(java.lang.String schemaID, java.lang.String routineName, char nameSpace)
          Get the list of routines matching the schema and routine name.
 org.apache.derby.iapi.types.RowLocation getRowLocationTemplate(org.apache.derby.iapi.sql.conn.LanguageConnectionContext lcc, TableDescriptor td)
           
 SchemaDescriptor getSchemaDescriptor(java.lang.String schemaName, org.apache.derby.iapi.store.access.TransactionController tc, boolean raiseError)
          Get the descriptor for the named schema.
 SchemaDescriptor getSchemaDescriptor(org.apache.derby.catalog.UUID schemaId, org.apache.derby.iapi.store.access.TransactionController tc)
          Get the descriptor for the named schema.
 org.apache.derby.iapi.types.NumberDataValue getSetAutoincrementValue(org.apache.derby.iapi.types.RowLocation rl, org.apache.derby.iapi.store.access.TransactionController tc, boolean doUpdate, org.apache.derby.iapi.types.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(org.apache.derby.catalog.UUID uuid)
          Get a SPSDescriptor given its UUID.
 org.apache.derby.iapi.types.DataTypeDescriptor[] getSPSParams(SPSDescriptor spsd, java.util.Vector defaults)
          Get all the parameter descriptors for an SPS.
 java.util.List getStatisticsDescriptors(TableDescriptor td)
          Gets all statistics Descriptors for a given table.
 SubKeyConstraintDescriptor getSubKeyConstraint(org.apache.derby.catalog.UUID constraintId, int type)
          Get a SubKeyConstraintDescriptor from syskeys or sysforeignkeys for the specified constraint id.
 SchemaDescriptor getSysIBMSchemaDescriptor()
          Get the descriptor for the SYSIBM schema.
 SchemaDescriptor getSystemDiagSchemaDescriptor()
          Get the descriptor for the SYSCS_DIAG schema.
 SchemaDescriptor getSystemSchemaDescriptor()
          Get the descriptor for the system schema.
 java.lang.String getSystemSQLName()
          Returns a unique system generated name of the form SQLyymmddhhmmssxxn yy - year, mm - month, dd - day of month, hh - hour, mm - minute, ss - second, xx - the first 2 digits of millisec because we don't have enough space to keep the exact millisec value, n - number between 0-9
 TabInfo getTabInfo(java.lang.String tableName)
          Get the tabinfo of a system catalog.
 TableDescriptor getTableDescriptor(java.lang.String tableName, SchemaDescriptor schema)
          Get the descriptor for the named table within the given schema.
 TableDescriptor getTableDescriptor(org.apache.derby.catalog.UUID tableID)
          Get the descriptor for the table with the given UUID.
 TriggerDescriptor getTriggerDescriptor(java.lang.String name, SchemaDescriptor sd)
          Get the stored prepared statement descriptor given a sps name.
 TriggerDescriptor getTriggerDescriptor(org.apache.derby.catalog.UUID uuid)
          Get a TriggerDescriptor given its UUID.
 GenericDescriptorList getTriggerDescriptors(TableDescriptor td)
          Load up the trigger descriptor list for this table descriptor and return it.
 org.apache.derby.iapi.services.uuid.UUIDFactory getUUIDFactory()
          Get the UUID Factory.
 ViewDescriptor getViewDescriptor(TableDescriptor td)
          Gets the viewDescriptor for the view given its TableDescriptor.
 ViewDescriptor getViewDescriptor(org.apache.derby.catalog.UUID uuid)
          Gets the viewDescriptor for the view with the given UUID.
 java.util.Hashtable hashAllConglomerateDescriptorsByNumber(org.apache.derby.iapi.store.access.TransactionController tc)
          Get all of the ConglomerateDescriptors in the database and hash them by conglomerate number.
 java.util.Hashtable hashAllTableDescriptorsByTableId(org.apache.derby.iapi.store.access.TransactionController tc)
          Get all of the TableDescriptors in the database and hash them by TableId This is useful as a performance optimization for the locking VTIs.
 void invalidateAllSPSPlans()
          Invalidate all the stored plans in SYS.SYSSTATEMENTS.
 boolean isSchemaEmpty(SchemaDescriptor sd)
          Indicate whether there is anything in the particular schema.
 boolean isSystemSchemaName(java.lang.String name)
          Determine whether a string is the name of the system schema.
 DataDictionaryContext pushDataDictionaryContext(org.apache.derby.iapi.services.context.ContextManager cm, boolean nested)
          Push a data dictionary context onto the current context manager.
 void setAutoincrementValue(org.apache.derby.iapi.store.access.TransactionController tc, org.apache.derby.catalog.UUID tableUUID, java.lang.String columnName, long aiValue, boolean incrementNeeded)
          sets a new value in SYSCOLUMNS for a particular autoincrement column.
 int startReading(org.apache.derby.iapi.sql.conn.LanguageConnectionContext lcc)
          Inform this DataDictionary that we are about to start reading it.
 void startWriting(org.apache.derby.iapi.sql.conn.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, org.apache.derby.iapi.store.access.TransactionController tc)
          Update the conglomerateNumber for an array of ConglomerateDescriptors.
 void updateConglomerateDescriptor(ConglomerateDescriptor cd, long conglomerateNumber, org.apache.derby.iapi.store.access.TransactionController tc)
          Update the conglomerateNumber for a ConglomerateDescriptor.
 void updateConstraintDescriptor(ConstraintDescriptor cd, org.apache.derby.catalog.UUID formerUUID, int[] colsToSet, org.apache.derby.iapi.store.access.TransactionController tc)
          Update the constraint descriptor in question.
 void updateLockGranularity(TableDescriptor td, SchemaDescriptor schema, char lockGranularity, org.apache.derby.iapi.store.access.TransactionController tc)
          Update the lockGranularity for the specified table.
 void updateSPS(SPSDescriptor spsd, org.apache.derby.iapi.store.access.TransactionController tc, boolean recompile, boolean updateSYSCOLUMNS, boolean wait, boolean firstCompilation)
          Updates SYS.SYSSTATEMENTS with the info from the SPSD.
 void updateTriggerDescriptor(TriggerDescriptor triggerd, org.apache.derby.catalog.UUID formerUUID, int[] colsToSet, org.apache.derby.iapi.store.access.TransactionController tc)
          Update the trigger descriptor in question.
 

Field Detail

MODULE

public static final java.lang.String MODULE
See Also:
Constant Field Values

DD_VERSION_CURRENT

public static final int DD_VERSION_CURRENT
Special version indicating the database must be upgraded to or created at the current engine level

See Also:
Constant Field Values

DD_VERSION_CS_5_0

public static final int DD_VERSION_CS_5_0
Cloudscape 5.0 System Catalog version

See Also:
Constant Field Values

DD_VERSION_CS_5_1

public static final int DD_VERSION_CS_5_1
Cloudscape 5.1 (Arwen) System Catalog version

See Also:
Constant Field Values

DD_VERSION_CS_5_2

public static final int DD_VERSION_CS_5_2
Cloudscape 5.2 (Frodo) System Catalog version

See Also:
Constant Field Values

DD_VERSION_CS_8_1

public static final int DD_VERSION_CS_8_1
Cloudscape 8.1 (Pre-Gandalf) System Catalog version

See Also:
Constant Field Values

DD_VERSION_CS_10_0

public static final int DD_VERSION_CS_10_0
Cloudscape/Derby 10.0 (Gandalf) System Catalog version

See Also:
Constant Field Values

DD_VERSION_DERBY_10_1

public static final int DD_VERSION_DERBY_10_1
Derby 10.1 System Catalog version

See Also:
Constant Field Values

DATABASE_ID

public static final java.lang.String DATABASE_ID
See Also:
Constant Field Values

CORE_DATA_DICTIONARY_VERSION

public static final java.lang.String CORE_DATA_DICTIONARY_VERSION
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.

See Also:
Constant Field Values

CREATE_DATA_DICTIONARY_VERSION

public static final java.lang.String CREATE_DATA_DICTIONARY_VERSION
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.

See Also:
Constant Field Values

SOFT_DATA_DICTIONARY_VERSION

public static final java.lang.String SOFT_DATA_DICTIONARY_VERSION
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.

See Also:
Constant Field Values

PROPERTY_CONGLOMERATE_VERSION

public static final java.lang.String PROPERTY_CONGLOMERATE_VERSION
See Also:
Constant Field Values

SYSCONGLOMERATES_CATALOG_NUM

public static final int SYSCONGLOMERATES_CATALOG_NUM
See Also:
Constant Field Values

SYSTABLES_CATALOG_NUM

public static final int SYSTABLES_CATALOG_NUM
See Also:
Constant Field Values

SYSCOLUMNS_CATALOG_NUM

public static final int SYSCOLUMNS_CATALOG_NUM
See Also:
Constant Field Values

SYSSCHEMAS_CATALOG_NUM

public static final int SYSSCHEMAS_CATALOG_NUM
See Also:
Constant Field Values

SYSCONSTRAINTS_CATALOG_NUM

public static final int SYSCONSTRAINTS_CATALOG_NUM
Catalog numbers for non core system catalogs.

See Also:
Constant Field Values

SYSKEYS_CATALOG_NUM

public static final int SYSKEYS_CATALOG_NUM
See Also:
Constant Field Values

SYSDEPENDS_CATALOG_NUM

public static final int SYSDEPENDS_CATALOG_NUM
See Also:
Constant Field Values

SYSALIASES_CATALOG_NUM

public static final int SYSALIASES_CATALOG_NUM
See Also:
Constant Field Values

SYSVIEWS_CATALOG_NUM

public static final int SYSVIEWS_CATALOG_NUM
See Also:
Constant Field Values

SYSCHECKS_CATALOG_NUM

public static final int SYSCHECKS_CATALOG_NUM
See Also:
Constant Field Values

SYSFOREIGNKEYS_CATALOG_NUM

public static final int SYSFOREIGNKEYS_CATALOG_NUM
See Also:
Constant Field Values

SYSSTATEMENTS_CATALOG_NUM

public static final int SYSSTATEMENTS_CATALOG_NUM
See Also:
Constant Field Values

SYSFILES_CATALOG_NUM

public static final int SYSFILES_CATALOG_NUM
See Also:
Constant Field Values

SYSTRIGGERS_CATALOG_NUM

public static final int SYSTRIGGERS_CATALOG_NUM
See Also:
Constant Field Values

SYSSTATISTICS_CATALOG_NUM

public static final int SYSSTATISTICS_CATALOG_NUM
See Also:
Constant Field Values

SYSDUMMY1_CATALOG_NUM

public static final int SYSDUMMY1_CATALOG_NUM
See Also:
Constant Field Values

NOTNULL_CONSTRAINT

public static final int NOTNULL_CONSTRAINT
See Also:
Constant Field Values

PRIMARYKEY_CONSTRAINT

public static final int PRIMARYKEY_CONSTRAINT
See Also:
Constant Field Values

UNIQUE_CONSTRAINT

public static final int UNIQUE_CONSTRAINT
See Also:
Constant Field Values

CHECK_CONSTRAINT

public static final int CHECK_CONSTRAINT
See Also:
Constant Field Values

DROP_CONSTRAINT

public static final int DROP_CONSTRAINT
See Also:
Constant Field Values

FOREIGNKEY_CONSTRAINT

public static final int FOREIGNKEY_CONSTRAINT
See Also:
Constant Field Values

COMPILE_ONLY_MODE

public static final int COMPILE_ONLY_MODE
Modes returned from startReading()

See Also:
Constant Field Values

DDL_MODE

public static final int DDL_MODE
See Also:
Constant Field Values
Method Detail

pushDataDictionaryContext

public DataDictionaryContext pushDataDictionaryContext(org.apache.derby.iapi.services.context.ContextManager cm,
                                                       boolean nested)
Push a data dictionary context onto the current context manager.


clearCaches

public void clearCaches()
                 throws org.apache.derby.iapi.error.StandardException
Clear all of the DataDictionary caches.


startReading

public int startReading(org.apache.derby.iapi.sql.conn.LanguageConnectionContext lcc)
                 throws org.apache.derby.iapi.error.StandardException
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.


doneReading

public void doneReading(int mode,
                        org.apache.derby.iapi.sql.conn.LanguageConnectionContext lcc)
                 throws org.apache.derby.iapi.error.StandardException
Inform this DataDictionary that we have finished reading it. This typically happens at the end of compilation.


startWriting

public void startWriting(org.apache.derby.iapi.sql.conn.LanguageConnectionContext lcc)
                  throws org.apache.derby.iapi.error.StandardException
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.


transactionFinished

public void transactionFinished()
                         throws org.apache.derby.iapi.error.StandardException
Inform this DataDictionary that the transaction in which writes have been done (or may have been done) has been committed or rolled back.


getExecutionFactory

public org.apache.derby.iapi.sql.execute.ExecutionFactory getExecutionFactory()
Get the ExecutionFactory associated with this database.


getDataValueFactory

public org.apache.derby.iapi.types.DataValueFactory getDataValueFactory()
Get the DataValueFactory associated with this database.


getDataDescriptorGenerator

public DataDescriptorGenerator getDataDescriptorGenerator()
Get a DataDescriptorGenerator, through which we can create objects to be stored in the DataDictionary.


getTabInfo

public TabInfo getTabInfo(java.lang.String tableName)
                   throws org.apache.derby.iapi.error.StandardException
Get the tabinfo of a system catalog. Paw through the tabinfo arrays looking for the tabinfo corresponding to this table name. RESOLVE: This does not bother to fault in the TabInfo. It assumes it already has been faulted in. This seems odd.


getSchemaDescriptor

public SchemaDescriptor getSchemaDescriptor(java.lang.String schemaName,
                                            org.apache.derby.iapi.store.access.TransactionController tc,
                                            boolean raiseError)
                                     throws org.apache.derby.iapi.error.StandardException
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.


getSchemaDescriptor

public SchemaDescriptor getSchemaDescriptor(org.apache.derby.catalog.UUID schemaId,
                                            org.apache.derby.iapi.store.access.TransactionController tc)
                                     throws org.apache.derby.iapi.error.StandardException
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.


getSystemSchemaDescriptor

public SchemaDescriptor getSystemSchemaDescriptor()
                                           throws org.apache.derby.iapi.error.StandardException
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.


getSysIBMSchemaDescriptor

public SchemaDescriptor getSysIBMSchemaDescriptor()
                                           throws org.apache.derby.iapi.error.StandardException
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.


getSystemDiagSchemaDescriptor

public SchemaDescriptor getSystemDiagSchemaDescriptor()
                                               throws org.apache.derby.iapi.error.StandardException
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.


getDeclaredGlobalTemporaryTablesSchemaDescriptor

public SchemaDescriptor getDeclaredGlobalTemporaryTablesSchemaDescriptor()
                                                                  throws org.apache.derby.iapi.error.StandardException
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.


isSystemSchemaName

public boolean isSystemSchemaName(java.lang.String name)
                           throws org.apache.derby.iapi.error.StandardException
Determine whether a string is the name of the system schema.


dropSchemaDescriptor

public void dropSchemaDescriptor(java.lang.String schemaName,
                                 org.apache.derby.iapi.store.access.TransactionController tc)
                          throws org.apache.derby.iapi.error.StandardException
Drop the descriptor for a schema, given the schema's name


isSchemaEmpty

public boolean isSchemaEmpty(SchemaDescriptor sd)
                      throws org.apache.derby.iapi.error.StandardException
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.


getTableDescriptor

public TableDescriptor getTableDescriptor(java.lang.String tableName,
                                          SchemaDescriptor schema)
                                   throws org.apache.derby.iapi.error.StandardException
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.)


getTableDescriptor

public TableDescriptor getTableDescriptor(org.apache.derby.catalog.UUID tableID)
                                   throws org.apache.derby.iapi.error.StandardException
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).


dropTableDescriptor

public void dropTableDescriptor(TableDescriptor td,
                                SchemaDescriptor schema,
                                org.apache.derby.iapi.store.access.TransactionController tc)
                         throws org.apache.derby.iapi.error.StandardException
Drop the table descriptor.


updateLockGranularity

public void updateLockGranularity(TableDescriptor td,
                                  SchemaDescriptor schema,
                                  char lockGranularity,
                                  org.apache.derby.iapi.store.access.TransactionController tc)
                           throws org.apache.derby.iapi.error.StandardException
Update the lockGranularity for the specified table.


getColumnDescriptorByDefaultId

public ColumnDescriptor getColumnDescriptorByDefaultId(org.apache.derby.catalog.UUID uuid)
                                                throws org.apache.derby.iapi.error.StandardException
Get a ColumnDescriptor given its Default ID.


dropColumnDescriptor

public void dropColumnDescriptor(org.apache.derby.catalog.UUID tableID,
                                 java.lang.String columnName,
                                 org.apache.derby.iapi.store.access.TransactionController tc)
                          throws org.apache.derby.iapi.error.StandardException
Given a column name and a table ID, drops the column descriptor from the table.


dropAllColumnDescriptors

public void dropAllColumnDescriptors(org.apache.derby.catalog.UUID tableID,
                                     org.apache.derby.iapi.store.access.TransactionController tc)
                              throws org.apache.derby.iapi.error.StandardException
Drops all column descriptors from the given table. Useful for DROP TABLE.


getViewDescriptor

public ViewDescriptor getViewDescriptor(org.apache.derby.catalog.UUID uuid)
                                 throws org.apache.derby.iapi.error.StandardException
Gets the viewDescriptor for the view with the given UUI