[fdo-internals] RE: MOTION: FDO RFC 34 - FDO Reader Access By Index

Badreddine Karoui badreddine.karoui at autodesk.com
Tue Sep 15 13:00:31 EDT 2009


It's true that unlike other RDBMS access APIs(such as ADO.Net), Fdo provides an additional mean of mapping properties to indexes.  Relying on the order of the properties returned by the class definition means that this behavior cannot be enforced at the API level and we have to rely on a documented behavior.
On the other hand, using an explicit function to map a given property to index will enforce/document the behavior by the API itself. As an added advantage, the new function is a familiar concept in other APIs. This should not be a performance issue since it's only needed once per execution.

Badreddine

From: fdo-internals-bounces at lists.osgeo.org [mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Traian Stanev
Sent: Tuesday, September 15, 2009 10:25 AM
To: FDO Internals Mail List
Subject: [fdo-internals] RE: MOTION: FDO RFC 34 - FDO Reader Access By Index


How hard would it be to fix the providers internally so that the index of the properties in the collection returned with GetClassDefinition corresponds to the index needed for getting the property by index? I suspect it is not too hard since it would involve the same amount of work as implementing this new GetPropertyIndex API, but will not add new API that one has to call before getting the properties by index.


Traian


From: fdo-internals-bounces at lists.osgeo.org [mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Klain Qin
Sent: Monday, September 14, 2009 11:02 PM
To: FDO Internals Mail List
Subject: [fdo-internals] RE: MOTION: FDO RFC 34 - FDO Reader Access By Index

Hi all,

While this RFC is being voted, I've updated it again in order to use access by index API more efficiently and correctly.

Previously in order to use access by index functions for FdoIFeatureReader or FdoIDataReader, the API users will have 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:


a.       If you don't set selected property names be returned from an FdoISelect command



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

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



b.      If you do set selected property names to be returned from an FdoISelect command



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)

So to resolve this inconvenience, RFC 34 is updated again to add another function for getting the index of a specific property name. Now both of the property name and index related functions are moved to FdoIReader as they are needed for both FdoIFeatureReader and FdoIDataReader.
FdoString* GetPropertyName(FdoInt32 index);
FdoInt32 GetPropertyIndex(FdoString* propertyName);
Can you take a look again at this RFC?

http://trac.osgeo.org/fdo/wiki/FDORfc34

Thanks,
Klain

From: fdo-internals-bounces at lists.osgeo.org [mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Greg Boone
Sent: Monday, September 14, 2009 11:33 PM
To: FDO Internals Mail List
Subject: [fdo-internals] MOTION: FDO RFC 34 - FDO Reader Access By Index

Hi all,

There were no further comments on RFC 34: http://trac.osgeo.org/fdo/wiki/FDORfc34  - FDO Reader Access By Index.

I would like to motion a vote to accept this RFC.

Thanks,
Greg.



From: fdo-internals-bounces at lists.osgeo.org [mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Greg Boone
Sent: Wednesday, September 09, 2009 12:41 PM
To: FDO Internals Mail List
Subject: [fdo-internals] RE: FDO RFC 34 - FDO Reader Access By Index

Hi All,

FDO RFC 34 - Access By Index: http://trac.osgeo.org/fdo/wiki/FDORfc34 has been updated and is ready for a secondary review.

Please refer to the section labeled: "Provider Implementation"

Please respond with comments by end of day, Friday September 11.

Greg

From: fdo-internals-bounces at lists.osgeo.org [mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Greg Boone
Sent: Thursday, August 06, 2009 9:39 AM
To: FDO Internals Mail List
Subject: [fdo-internals] FDO RFC 34 - FDO Reader Access By Index

Hi All,

FDO RFC 34, http://trac.osgeo.org/fdo/wiki/FDORfc34, is ready for review.

Please review and respond with comments.

Greg




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/fdo-internals/attachments/20090915/07c788ee/attachment.html


More information about the fdo-internals mailing list