Changes between Version 38 and Version 39 of FDORfc50


Ignore:
Timestamp:
Jul 13, 2010, 5:38:16 AM (14 years ago)
Author:
romicadascalescu
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FDORfc50

    v38 v39  
    148148      enum FdoJoinType
    149149      {
    150           /// default join type.
    151           FdoJoinType_None = 0x01,
     150          /// default join type. This value can be returned by the GetJoinTypes()
     151          /// in case joins are not supported
     152          /// rather than provider throw an exception can return this value
     153          /// in case join are not  supported (this is like NAN for doubles)
     154          FdoJoinType_None = 0x00,
    152155          /// inner join
    153           FdoJoinType_Inner = 0x02,
     156          FdoJoinType_Inner = 0x01,
    154157          /// right outer join
    155           FdoJoinType_RightOuter = 0x04,
     158          FdoJoinType_RightOuter = 0x02,
    156159          /// left outer join
    157           FdoJoinType_LeftOuter = 0x08,
     160          FdoJoinType_LeftOuter = 0x04,
    158161          /// full outer join
    159           FdoJoinType_FullOuter = 0x10,
    160           /// cross join
    161           FdoJoinType_Cross = 0x20
     162          FdoJoinType_FullOuter = 0x08,
     163          /// cross join (cartesian join)
     164          /// can be used for cases like SELECT * FROM A, B
     165          FdoJoinType_Cross = 0x10
    162166      };
    163167}}}
    164168
    165169We need to add two new methods in connection capabilities: supports join selects (to avoid an exception when a user will try to use the new method from FdoISelect) and also supported join types which can be a collection or a value as OR between values, since all join types cannot be more than we can fit in a int32 using OR e.g.: val1|val2. We need to add an extra capability named !SupportsSubSelects() since sub-select will be handled in filter side and applications might need a way to detect if it will allow users to create sub-selects in filter.
     170GetJoinTypes() will return FdoJoinType_None in case no join is supported.
     171Since we can detect if a connection can support joins using GetJoinTypes() then SupportsJoins() can be removed or can be implemented as SupportsJoins(){return (GetJoinTypes() != 0);}
    166172
    167173{{{
     
    253259
    254260      FdoPtr<FdoIdentifier> fcname2 = FdoIdentifier::Create(L"class2");
    255       FdoPtr<FdoJoinCriteria> jc1 = FdoJoinCriteria::Create(L"p2", fcname2, FdoJoinType_None);
     261      FdoPtr<FdoJoinCriteria> jc1 = FdoJoinCriteria::Create(L"p2", fcname2, FdoJoinType_Cross);
    256262      jcrits->Add(jc1);
    257263