| 712 | == Addendum, Sept. 15, 2009 == |
| 713 | |
| 714 | Previously, there is not a function to get the property index given the name of the property like FdoInt32 GetPropertyIndex(FdoString* propertyName); To use access by index functions on FdoIFeatureReader and FdoIDataReader will be hard for API users as they need to know beforehand how index is mapping to property name and mapping is different for different provider implementations like SqlLite/SDF and RDBMS. E.g. with the same FDO schema definition, SqlLite and RDBMS will arrange the property order returned from GetClassDefinition() differently: |
| 715 | a. If you don’t set selected property names be returned from an FdoISelect command |
| 716 | |
| 717 | SqlLite provider will arrange the properties in the order: Identity property -> Geometry property -> the left will be arranged in the order of how they are added into the class definition, like ID -> geometry -> datetime-> double |
| 718 | For RDBMS provider the order is: identity property -> the left is ordered by the first character of the property name like ID -> datetime-> double -> geometry |
| 719 | |
| 720 | b. If you do set selected property names to be returned from an FdoISelect command |
| 721 | |
| 722 | SqlLite provider will respect the order of how they are added to selected properties. SDF provider will respect the order of corresponding properties defined in the original class definition(without setting selected properties) |
| 723 | |
| 724 | So we added another function of FdoInt32 GetPropertyIndex(FdoString* propertyName) in this RFC in order for API users to use the access by index on all readers conveniently and correctly. Now both of the property name and index related functions are moved to FdoIReader as they are needed for both FdoIFeatureReader and FdoIDataReader. |
| 725 | FdoString* GetPropertyName(FdoInt32 index); |
| 726 | FdoInt32 GetPropertyIndex(FdoString* propertyName); |