Compare (OraLOB) Method

Description

Compares the specified portion of the LOB value of an OraBLOB or OraCLOB object (or OraBFILE object) to the LOB value of the input OraBLOB or OraCLOB object (or OraBFILE object).

Usage

IsEqual = OraBlob.Compare srcBlob, amount, Offset, srcOffset
IsEqual = OraClob.Compare srcClob, amount, Offset, srcOffset
IsEqual = OraBfile.Compare srcBfile, amount, Offset, srcOffset

Arguments

The arguments for the method are:

Arguments Description
[in] srcLOB Input OraBLOB, OraCLOB, or OraBFILE object whose value is to be compared.
[in] [optional] amount An Integer specifying the number of bytes or characters to compare. The default value of amount is from the Offset to the end of each LOB.
[in] [optional] Offset An Integer specifying the 1-based Offset in bytes (OraBLOB or OraBFILE) or characters (OraCLOB) in the value of this object. Default value is 1.
[in] [optional] srcOffset An Integer specifying the 1-based Offset in bytes (OraBLOB or OraBFILE) or characters (OraCLOB) in the value of the srcLob object. Default value is 1.
[out] IsEqual A Boolean representing the result of a compare operation.

Remarks

The Compare method returns True if comparison succeeds; otherwise, it returns False.

If the amount to be compared causes the comparison to take place beyond the end of one LOB but not beyond the end of the other, the comparison fails. Such a comparison could succeed only if the amount of data from the Offset to the end is the exactly the same for both LOBs.

This call is currently implemented by executing a PL/SQL block that utilizes DBMS_LOB.INSTR().