| 69 | |
| 70 | === Type Compatibility === |
| 71 | |
| 72 | See attached document -- FDO !DataValue Type Compatibility.docx |
| 73 | |
| 74 | === Type Conversions === |
| 75 | |
| 76 | See attached document -- FDO !DataValue Type Compatibility.docx |
| 77 | |
| 78 | === Collation by Data Type === |
| 79 | |
| 80 | This section describes how values of each type will be ordered for comparison purposes. |
| 81 | |
| 82 | '''Boolean''': Values will not be ordered. When !FdoBooleanValue::Compare() is passed another !FdoBooleanValue it will return: |
| 83 | |
| 84 | ''!FdoCompareType_Equal'' – if they are equal |
| 85 | |
| 86 | ''!FdoCompareType_Undefined'' – if they are not equal |
| 87 | |
| 88 | '''Numeric Types''' ( Byte, Decimal, Double, Int16, Int32, Int64, Single ): Values will be ordered numerically. |
| 89 | |
| 90 | '''!DateTime''': Values will be ordered from earliest to latest. |
| 91 | |
| 92 | '''String, CLOB''': Values will be ordered lexically. TBD: Should collation be a default binary one or the one for the current locale? |
| 93 | |
| 94 | '''BLOB''': each pair of bytes from the two values will be compared, starting at the first ones, until the first differing pair of bytes is reached. Comparison will be based on the binary values of these differing bytes. If the end of one BLOB is reached before the other one, the longer BLOB will be considered to be greater than the other BLOB. |
| 95 | |
| 96 | === Issues === |
| 97 | |
| 98 | Should string value comparisons be based on current locale? |
| 99 | |