[fdo-internals] New FDO RFC 50 posted - Extend FDO API to Select from Multiple Classes and Select Joins

Haris Kurtagic haris at sl-king.com
Wed Jun 16 09:55:24 EDT 2010


I got email back from admin that email with my answer was to big, so I
will  repeat it without previous emails.

Hi Orest,

For Alias part:

I made mistake in sample (not parent but parcel),
"sel->SetFeatureClassName(L"parent");"

As you suggested, we need to be able to define alias for class coming
into join to be able to support self join
And that alias is right now defined in join criteria itself as it is
suggested in original RFC :
"FdoPtr<FdoJoinCriteria> jc1 =
FdoJoinCriteria::Create(L"child",FdoIdentifier::Create(L"parcel"),
FdoJoinType_Inner, jfilter);"

I agree with you, eventually we would need only one alias even for self-join
but I think it is clearer to write join criteria as:
"parent.fid = child.parent_id" then "fid = child.parent_id".
In second case it is not so obvious that fid is coming from main class.
Beside it looks better for me, also I think it would be easier for
join criteria filter processor to handle such filter.

Because of that I suggested that we add ability to define additional
aliases into join criteria as needed and we are free to use it in both
ways.

Also, I would change FdoJoinCriteria so it is not necessary to define
new alias for join class in constructor.
FdoJoinCriteria would  have :
"joincriteria->SetFeatureClassName(L"parent");"
and add "AddAlias(alias,class)" function so aliases can be defined if
needed ( which depends on join filter ).


For properties part:
Yes, exactly. Properties to return would be combined from main list
and join criteria lists.

Haris


More information about the fdo-internals mailing list