Search in sources :

Example 1 with TupleFilter

use of org.apache.derby.iapi.sql.execute.TupleFilter in project derby by apache.

the class DataDictionaryImpl method dropStoredDependency.

/**
 * Drop a single dependency from the data dictionary.
 *
 * @param dd	The DependencyDescriptor.
 * @param tc	TransactionController for the transaction
 *
 * @exception StandardException		Thrown on failure
 */
public void dropStoredDependency(DependencyDescriptor dd, TransactionController tc) throws StandardException {
    ExecIndexRow keyRow1 = null;
    UUID dependentID = dd.getUUID();
    UUID providerID = dd.getProviderID();
    DataValueDescriptor dependentIDOrderable = getIDValueAsCHAR(dependentID);
    TabInfoImpl ti = getNonCoreTI(SYSDEPENDS_CATALOG_NUM);
    /* Use dependentIDOrderable in both start 
		 * and stop position for index 1 scan. 
		 */
    keyRow1 = (ExecIndexRow) exFactory.getIndexableRow(1);
    keyRow1.setColumn(1, dependentIDOrderable);
    // only drop the rows which have this providerID
    TupleFilter filter = new DropDependencyFilter(providerID);
    ti.deleteRows(tc, // start row
    keyRow1, ScanController.GE, // qualifier
    null, // filter on base row
    filter, // stop row
    keyRow1, ScanController.GT, SYSDEPENDSRowFactory.SYSDEPENDS_INDEX1_ID);
}
Also used : DataValueDescriptor(org.apache.derby.iapi.types.DataValueDescriptor) UUID(org.apache.derby.catalog.UUID) ExecIndexRow(org.apache.derby.iapi.sql.execute.ExecIndexRow) TupleFilter(org.apache.derby.iapi.sql.execute.TupleFilter)

Aggregations

UUID (org.apache.derby.catalog.UUID)1 ExecIndexRow (org.apache.derby.iapi.sql.execute.ExecIndexRow)1 TupleFilter (org.apache.derby.iapi.sql.execute.TupleFilter)1 DataValueDescriptor (org.apache.derby.iapi.types.DataValueDescriptor)1