Changes between Version 14 and Version 15 of FDORfc55
- Timestamp:
- 06/06/11 13:35:01 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
FDORfc55
v14 v15 49 49 Below the mapping between FdoIntXX datatypes and Decimal precision: 50 50 51 || Fdo type || precision || range ||51 || Fdo type || precision || range || 52 52 || !FdoInt16 || 1...6 || -32,768 to 32,767 || 53 53 || !FdoInt32 || 7...11 || -2,147,483,648 to 2,147,483,647 || 54 54 || !FdoInt64 || 12...20 || -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 || 55 55 56 Note: beyond the !FdoInt64 range the current behaviour will be preserved, i.e. the property type will remain !FdoDecimal and a data reader will return a Double. 56 Note: beyond the !FdoInt64 range the current behaviour will be preserved, i.e. the property type will remain !FdoDecimal. 57 58 But assume a SHP file with a column of DECIMAL(4,0). DescribeSchema will return that as a FdoInt16. On an insert operation we need to make sure the user has enough information to avoid values out of (-999, 999) range. Or in an ApplySchema operation we need to treat the Int16 as DECIMAL(6,0) as opposed to DECIMAL(4,0) to be sure it can handle the full range. Therefore a suplimentary change is needed: the FdoPropertyDefinition will return FdoIntXX datatype but retain the original Precision (the Scale is implicit zero). 59 57 60 58 61 == Implications == … … 64 67 * The provider will return a FdoIntXX even for properties which originally were DECIMAL(p, 0). This issue can be mitigated by noting the SHP provider already does silent corrections on the fly in certain cases, like truncating the property names when found too long (both on reading and writing). 65 68 69 * The FdoDataPropertyDefinition documentation will be change to reflect that precision apply to all integer types not only for decimals. In case the precision is not set (zero) then the full range is assumed. This is the current behavior. 70 71 {{{ 72 /// \brief 73 /// Gets the precision (total number of digits) of a decimal or integer data property. 74 /// This value does not apply to any other FdoDataType. 75 /// 76 FDO_API FdoInt32 GetPrecision(); 77 78 }} 79 66 80 == Test Plan == 67 81 68 * Enhance the unit test and add roundtripping fidelity tests for !FdoInt16, !FdoInt32 and !FdoInt64 properties. 82 * Enhance the unit tests and add roundtripping fidelity tests for !FdoInt16, !FdoInt32 and !FdoInt64 properties. 83 * Add tests to check for out of range values. Make sure the out-of-range values on insert are detected. 69 84 70 85 == !Funding/Resources ==