📄 datadictionary.java
字号:
* 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.) * * @param cds The array of ConglomerateDescriptors * @param conglomerateNumber The new conglomerate number * @param tc The TransactionController to use * * @return Nothing. * * @exception StandardException Thrown on failure */ public void updateConglomerateDescriptor(ConglomerateDescriptor[] cds, long conglomerateNumber, TransactionController tc) throws StandardException; /** * 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.) * * @param cd The ConglomerateDescriptor * @param conglomerateNumber The new conglomerate number * @param tc The TransactionController to use * * @return Nothing. * * @exception StandardException Thrown on failure */ public void updateConglomerateDescriptor(ConglomerateDescriptor cd, long conglomerateNumber, TransactionController tc) throws StandardException; /** * Gets a list of the dependency descriptors for the given dependent's id. * * @param dependentID The ID of the dependent we're interested in * * @return List Returns a list of DependencyDescriptors. * Returns an empty list if no stored dependencies for the * dependent's ID. * * @exception StandardException Thrown on failure */ public List getDependentsDescriptorList(String dependentID) throws StandardException; /** * Gets a list of the dependency descriptors for the given provider's id. * * @param dependentID The ID of the provider we're interested in * * @return List Returns a list of DependencyDescriptors. * Returns an empty List if no stored dependencies for the * provider's ID. * * @exception StandardException Thrown on failure */ public List getProvidersDescriptorList(String providerID) throws StandardException; /** * Build and return an List with DependencyDescriptors for * all of the stored dependencies. * This is useful for consistency checking. * * @return List List of all DependencyDescriptors. * * @exception StandardException Thrown on failure */ public List getAllDependencyDescriptorsList() throws StandardException; /** * Drop a dependency from the data dictionary. * * @param dd The DependencyDescriptor. * @param tc TransactionController for the transaction * * @return Nothing. * * @exception StandardException Thrown on failure */ public void dropStoredDependency(DependencyDescriptor dd, TransactionController tc ) throws StandardException; /** * Remove all of the stored dependencies for a given dependent's ID * from the data dictionary. * * @param dependentsUUID Dependent's uuid * @param tc TransactionController for the transaction * * @return Nothing. * * @exception StandardException Thrown on failure */ public void dropDependentsStoredDependencies(UUID dependentsUUID, TransactionController tc) throws StandardException; /** * Get the UUID Factory. (No need to make the UUIDFactory a module.) * * @return UUIDFactory The UUID Factory for this DataDictionary. */ UUIDFactory getUUIDFactory(); /** * Get an AliasDescriptor given its UUID. * * @param uuid The UUID * * * @return The AliasDescriptor for method alias. * * @exception StandardException Thrown on failure */ public AliasDescriptor getAliasDescriptor(UUID uuid) throws StandardException; /** * Get a AliasDescriptor by alias name and name space. * NOTE: caller responsible for handling no match. * @param schemaId schema identifier * @param aliasName The alias name. * @param nameSpace The alias name space. * * @return AliasDescriptor AliasDescriptor for the alias name and name space * * @exception StandardException Thrown on failure */ public AliasDescriptor getAliasDescriptor(String schemaID, String aliasName, char nameSpace) throws StandardException; /** Get the list of routines matching the schema and routine name. */ public java.util.List getRoutineList(String schemaID, String routineName, char nameSpace) throws StandardException; /** * Drop an AliasDescriptor from the DataDictionary * * @param ad The AliasDescriptor to drop * @param tc The TransactionController * * @return Nothing. * * @exception StandardException Thrown on failure */ public void dropAliasDescriptor(AliasDescriptor ad, TransactionController tc) throws StandardException; /** * Get core catalog info. * * @param coreNum The index into coreInfo[]. * * @return Nothing. * * @exception StandardException Thrown on error */ public TabInfo getCoreCatalog(int coreNum) throws StandardException; public int getEngineType(); /** * Get a FileInfoDescriptor given its id. * * @param id The descriptor's id. * * @exception StandardException Thrown on failure */ public FileInfoDescriptor getFileInfoDescriptor(UUID id) throws StandardException; /** * Get a FileInfoDescriptor given its SQL name and * schema name. * * @param SQLName the FileInfoDescriptor SQLname. * @param sd the schema that holds the FileInfoDescriptor. * * @exception StandardException Thrown on failure */ public FileInfoDescriptor getFileInfoDescriptor(SchemaDescriptor sd, String name) throws StandardException; /** * Drop a FileDescriptor from the datadictionary. * * @exception StandardException Oops */ public void dropFileInfoDescriptor(FileInfoDescriptor fid) throws StandardException; /** * 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. * * @param tc TransactionControler to use to compute the row location. * @param td TableDescriptor * * @return array of row locations, null if table has no autoinc columns. * * @exception standard exception on error. */ public RowLocation[] computeAutoincRowLocations(TransactionController tc, TableDescriptor td) throws StandardException; /* Returns a row location template for a table */ public RowLocation getRowLocationTemplate( LanguageConnectionContext lcc, TableDescriptor td) throws StandardException; /** * 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. * * @param rl RowLocation of the entry in SYSCOLUMNS. * @param tc TransactionController to use. * @param doUpdate Write the new value to disk if TRUE. * @param newValue A NumberDataValue to use to return incremented value. If * null, then the caller simply wants the current value fromd disk. * @param wait If true, then the caller wants to wait for locks. When * using a nested user xaction we want to timeout right away if the parent * holds the lock. */ public NumberDataValue getSetAutoincrementValue(RowLocation rl, TransactionController tc, boolean doUpdate, NumberDataValue newValue, boolean wait) throws StandardException; /** * sets a new value in SYSCOLUMNS for a particular * autoincrement column. * * @param tc Transaction Controller to use. * @param td Table Descriptor * @param columnName Name of the column. * @param aiValue Value to write to SYSCOLUMNS. * @param incrementNeeded Whether we should increment the value passed in by * the user (aiValue) before writing the value to SYSCOLUMNS. */ public void setAutoincrementValue(TransactionController tc, UUID tableUUID, String columnName, long aiValue, boolean incrementNeeded) throws StandardException; /** * Gets all statistics Descriptors for a given table. */ public List getStatisticsDescriptors(TableDescriptor td) throws StandardException; /** * 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. * * @param tableUUID UUID of the table * @param referenceUUID UUID of the index. This can be null. * @param tc Transcation Controller to use. */ public void dropStatisticsDescriptors(UUID tableUUID, UUID referenceUUID, TransactionController tc) throws StandardException; /** * Returns the dependency manager for this DataDictionary. Associated with * each DataDictionary object there is a DependencyManager object which * keeps track of both persistent and stored dependencies. * * @see org.apache.derby.iapi.sql.depend.DependencyManager */ public DependencyManager getDependencyManager(); /** * Returns the cache mode of the data dictionary. */ public int getCacheMode(); /** * 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 * * @return system generated unique name */ public String getSystemSQLName(); /** * Adds a descriptor to a system catalog identified by the catalogNumber. * * @param tuple descriptor to insert. * @param parent parent descriptor; e.g for a column parent is the * tabledescriptor to which the descriptor is beign inserted. for most other * objects it is the schema descriptor. * @param catalogNumber a value which identifies the catalog into which * the descriptor should be inserted. It is the users responsibility to * ensure that the catalogNumber is consistent with the tuple being * inserted. * @see DataDictionary#SYSCONGLOMERATES_CATALOG_NUM * @param allowsDuplicates whether an exception should be thrown if the * insert results in a duplicate; if this parameter is FALSE then one * of the following exception will be thrown; LANG_OBJECT_ALREADY_EXISTS (if * parent is null) or LANG_OBJECT_ALREADY_EXISTS_IN_OBJECT (if parent is not * null). The error message is created by getting the name and type of the * tuple and parent. * @see org.apache.derby.impl.sql.catalog.DataDictionaryImpl#duplicateDescriptorException * @param tc the transaction controller to use to do all of this. * * @see #addDescriptorArray */ public void addDescriptor(TupleDescriptor tuple, TupleDescriptor parent, int catalogNumber, boolean allowsDuplicates, TransactionController tc) throws StandardException; /** array version of addDescriptor. * @see #addDescriptor */ public void addDescriptorArray(TupleDescriptor[] tuple, TupleDescriptor parent, int catalogNumber, boolean allowsDuplicates, TransactionController tc) throws StandardException; /** Check to see if a database has been upgraded to the required level in order to use a langauge feature that is. <P> 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. <P> 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 <PRE> // check and throw an exception if the database is not at 10.1 dd.checkVersion(DataDictionary.DD_VERSION_DERBY_10_1, "NEW FEATURE NAME"); </PRE> 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. <BR> It is not expected that this method would be called at execution time. @param majorVersion Data Dictionary major version (DataDictionary.DD_ constant) @param feature Non-null to throw an error, null to return the state of the version match. @return True if the database has been upgraded to the required level, false otherwise. */ public boolean checkVersion(int majorVersion, String feature) throws StandardException;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -