603 | | Both FdoISqlReader and FdoIDataReader have the function to get the column name or property name according to the index. With this capability, it should be pretty easy to provide default implementation for all access by index functions. Take FdoIDataReader as an example: |
604 | | |
605 | | class FdoIDataReader: public FdoIReader |
606 | | { |
607 | | public: |
608 | | virtual FdoInt32 GetInt32(FdoInt32 index) |
609 | | { |
610 | | FdoStringP propName = GetPropertyName(index); |
611 | | return GetInt32(propName); |
612 | | } |
| 603 | Both FdoISqlReader and FdoIDataReader have the function to get the column name or property name according to the index. With this capability, it should be pretty easy to provide default implementation for all access by index functions. Take GetInt32() as an example: |
| 604 | |
| 605 | {{{ |
| 606 | FdoInt32 GetInt32(FdoInt32 index) |
| 607 | { |
| 608 | FdoStringP propName = GetPropertyName(index); |
| 609 | return GetInt32(propName); |