use of org.apache.derby.iapi.sql.dictionary.CatalogRowFactory in project derby by apache.
the class DD_Version method modifySysTableNullability.
/**
* Modifies the nullability of the system table corresponding
* to the received catalog number.
*
* @param tc TransactionController.
* @param catalogNum The catalog number corresponding
* to the table for which we will modify the nullability.
*
* OLD Cloudscape 5.1 upgrade code
* If this corresponds to SYSALIASES, then the nullability of
* the SYSALIASES.ALIASINFO column will be changed to true
* (Beetle 4430). If this corresponds to SYSSTATEMENTS,
* the nullability of the SYSSTATEMENTS.LASTCOMPILED
* column will be changed to true.
*
* Derby upgrade code
* If this corresponds to SYSSTATEMENTS, then the nullability of
* the SYSSTATEMENTS.COMPILATION_SCHEMAID column will
* be changed to true. If this corresponds to SYSVIEWS, the nullability
* of the SYSVIEWS.COMPILATION_SCHEMAID column will be changed to true.
*
* @exception StandardException Thrown on error
*/
private void modifySysTableNullability(TransactionController tc, int catalogNum) throws StandardException {
TabInfoImpl ti = bootingDictionary.getNonCoreTIByNumber(catalogNum);
CatalogRowFactory rowFactory = ti.getCatalogRowFactory();
if (catalogNum == DataDictionaryImpl.SYSSTATEMENTS_CATALOG_NUM) {
// SYSSTATEMENTS table ==> SYSSTATEMENTS_COMPILATION_SCHEMAID needs
// to be modified.
bootingDictionary.upgradeFixSystemColumnDefinition(rowFactory, SYSSTATEMENTSRowFactory.SYSSTATEMENTS_COMPILATION_SCHEMAID, tc);
} else if (catalogNum == DataDictionaryImpl.SYSVIEWS_CATALOG_NUM) {
// SYSVIEWS table ==> SYSVIEWS_COMPILATION_SCHEMAID needs
// to be modified.
bootingDictionary.upgradeFixSystemColumnDefinition(rowFactory, SYSVIEWSRowFactory.SYSVIEWS_COMPILATION_SCHEMAID, tc);
}
/* OLD Cloudscape 5.1 upgrade code. See applySafeChanges().
if (catalogNum == DataDictionaryImpl.SYSALIASES_CATALOG_NUM) {
// SYSALIASES table ==> ALIASINFO needs to be modified.
bootingDictionary.upgrade_setNullability(rowFactory,
SYSALIASESRowFactory.SYSALIASES_ALIASINFO, true, tc);
}
else if (catalogNum == DataDictionaryImpl.SYSSTATEMENTS_CATALOG_NUM) {
// SYSSTATEMENTS table ==> LASTCOMPILED needs to be modified.
bootingDictionary.upgrade_setNullability(rowFactory,
SYSSTATEMENTSRowFactory.SYSSTATEMENTS_LASTCOMPILED, true, tc);
}
*/
}
Aggregations