Documentation of 'org.apache.derby.impl.sql.execute.RIBulkChecker' Java class
RIBulkChecker
org.apache.derby.impl.sql.execute

Class RIBulkChecker



  • public class RIBulkChecker
    extends java.lang.Object
    Do a merge run comparing all the foreign keys from the foreign key conglomerate against the referenced keys from the primary key conglomerate. The scanControllers are passed in by the caller (caller controls locking on said conglomerates).

    The comparision is done via a merge. Consequently, it is imperative that the scans are on keyed conglomerates (indexes) and that the referencedKeyScan is a unique scan.

    Performance is no worse than N + M where N is foreign key rows and M is primary key rows.

    Bulk fetch is used to further speed performance. The fetch size is LanguageProperties.BULK_FETCH_DEFAULT

    See Also:
    LanguageProperties
    • Constructor Detail

      • RIBulkChecker

        public RIBulkChecker(Activation a,
                             GroupFetchScanController referencedKeyScan,
                             GroupFetchScanController foreignKeyScan,
                             ExecRow templateRow,
                             boolean quitOnFirstFailure,
                             ConglomerateController unreferencedCC,
                             ExecRow firstRowToFail,
                             java.lang.String schemaName,
                             java.lang.String tableName,
                             UUID constraintId,
                             boolean deferrable,
                             long fkCID,
                             long pkCID)
                      throws StandardException
        Create a RIBulkChecker
        Parameters:
        a - the activation
        referencedKeyScan - scan of the referenced key's backing index. must be unique
        foreignKeyScan - scan of the foreign key's backing index
        templateRow - a template row for the indexes. Will be cloned when it is used. Must be a full index row.
        quitOnFirstFailure - quit on first unreferenced key
        unreferencedCC - put unreferenced keys here
        firstRowToFail - the first row that fails the constraint is copied to this, if non-null
        schemaName - schema name of the table we insert into
        tableName - table name of the table we insert into
        constraintId - constraint id of the foreign constraint
        deferrable - true if the constraint is deferrable
        fkCID - conglomerate id of the foreign key supporting index
        pkCID - conglomerate id of the referenced primary key or unique index.
        Throws:
        StandardException
    • Method Detail

      • doCheck

        public int doCheck()
                    throws StandardException
        Perform the check. If deferred constraint mode, the numbers of failed rows returned will be always be 0 (but any violating keys will have been saved for later checking).
        Returns:
        the number of failed rows
        Throws:
        StandardException - on error

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.