When you compare two values of a given UDT, the system invokes the MAP routine for each of them, then compares the returned values from the MAP routine invocations. Returned values can be specified to have any predefined data type except BLOB or CLOB, and the result of the UDT data type comparison is the same as the result of comparing the returned predefined type values.
The following notation represents the various types of variables used to specify the values to be compared and the external routines used to compare them:
- Let x and y represent the respective values of the UDT to be compared.
- The following table indicates the notation used to represent UDFs and methods:
IF the MAP routine is this type of external routine … THEN use the following notation to represent it … user-defined method M() user-defined function F
The following table provides examples of the relationships between different values of the same UDT and the user-defined methods used to operate on them:
IF the following method mappings evaluate to TRUE … | THEN the result of x comparison_operator y is … |
---|---|
x.M() = Y.M() | x = Y |
x.M() < Y.M() | x < Y |
x.M() <> Y.M() | x <> Y |
x.M() > Y.M() | x > Y |
x.M() ≤ Y.M() | x ≤ Y |
x.M() ≥ Y.M() | x ≥ Y |
The following table provides examples of the relationships between different values of the same UDT and the user-defined functions used to operate on them:
IF the following UDF mappings evaluate to TRUE … | THEN the result of x comparison_operator y is … |
---|---|
F(x) = F(y) | x = y |
F(x) < F(y) | x < y |
F(x) <> F(y) | x <> y |
F(x) > F(y) | x > y |
F(x) ≤ F(y) | x ≤ y |
F(x) ≥ F(y) | x ≥ y |