Changes between Version 3 and Version 4 of FDORfc50


Ignore:
Timestamp:
Jun 2, 2010, 11:10:36 AM (14 years ago)
Author:
gregboone
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FDORfc50

    v3 v4  
    3939     *  '''Cons''': We add a new command and a new type command, we already have a FdoIExtendedSelect for scrollable readers and users can be confused by those two commands. This will add more complexity in the API.
    4040
    41  * 2. Enhance FdoISelect, then create a !FdoSelect base class and add default implementers for !GetFeatureClassNames () and !GetJoinCriteria(). Then each provider would be changed to base their select command implementation on !FdoSelect instead of FdoISelect. Two new capability functions will be added so that applications can determine: if a provider supports the join criteria and supported join types, SupportsJoins() & !GetJoinTypes(). Again, if future enhancements are ever made to FdoISelect, the need to change each provider would be eliminated.
     41 * 2. Enhance FdoISelect, then create a !FdoSelect base class and add default implementers for !GetFeatureClassNames () and !GetJoinCriteria(). Then each provider would be changed to base their select command implementation on !FdoSelect instead of FdoISelect. Two new capability functions will be added so that applications can determine: if a provider supports the join criteria and supported join types, !SupportsJoins() & !GetJoinTypes(). Again, if future enhancements are ever made to FdoISelect, the need to change each provider would be eliminated.
    4242     *  '''Pro''': this solution will not add more complexity to the API.
    4343     *  '''Cons''': We need to change all the providers leading to a big effort from everyone.
     
    5555 * A. '''Selecting form multiple classes'''. We should be able to select from multiple classes and have filters applied on any class attributes. In order to be able to achieve that we can use FdoISelect::!GetFeatureClassNames () and add all classes we want to select from. The filter must be based on properties from the selected classes and filter can be validated at run time when the whole select is built. In this collection we can have:
    5656     *  FdoIdentifier’s in case we just need to pass a class name.
    57      *  !FdoComputedIdentifier’s having a name and as expression value a FdoIdentifier, this way we can get aliases, e.g. PropName AS NewPropName. We already use computed identifiers in our API for expressions and we provide a name and an expression value. In this case it will be the same, since an alias is actually an expression: we provide an alias (name) and the real name of the property.
     57     *  !FdoComputedIdentifier’s having a name and as expression value a FdoIdentifier, this way we can get aliases, e.g. !PropName AS !NewPropName. We already use computed identifiers in our API for expressions and we provide a name and an expression value. In this case it will be the same, since an alias is actually an expression: we provide an alias (name) and the real name of the property.
    5858     *  !FdoClassComputedIdentifier’s which is a FdoISelect having a name. This option might not be supported by all RDBMS providers and it depends of the internal implementation. This class behaves like a computed class which will be evaluated at run time and really depends of the provider implementation. This new class will help to define sub-selects, see below case (C)
    5959
     
    8181}}}
    8282
    83 '''Note:''' In the base class we have a method named GetFeatureClassName, in case caller will use it and the !FdoIdentifier is not added into !GetFeatureClassNames we can add it at Execute time.
     83'''Note:''' In the base class we have a method named !GetFeatureClassName, in case caller will use it and the !FdoIdentifier is not added into !GetFeatureClassNames we can add it at Execute time.
    8484
    8585
     
    9090      class FdoJoinCriteria : public FdoIDisposable
    9191      {
    92       /// \cond DOXYGEN-IGNORE
    93       protected:
    94           /// Constructs a default instance of a join criteria.
    95           FdoJoinCriteria();
    96 
    97           /// Constructs an instance of a join criteria using the specified arguments.
    98           FdoJoinCriteria(FdoString* name,
    99                           FdoIdentifier* joinClass,
    100                           FdoJoinType joinType,
    101                           FdoFilter* filter);
    102 
    103           /// Default destructor for join criteriab.
    104           virtual ~FdoJoinCriteria();
    105 
    106           virtual void Dispose();
    107 
    10892      public:
    10993          /// Constructs a default instance of a join criteria.
     
    139123          /// Sets the join filter, e.g. LEFT JOIN rclass ON(filter)
    140124          FDO_API void SetFilter(FdoFilter* value);
    141 
    142       private:
    143           wchar_t*    m_name;
    144           FdoIdentifier* m_JoinClass;
    145           FdoJoinType m_JoinType;
    146           FdoFilter* m_Filter;
    147125      };
    148126
     
    170148      class FdoIConnectionCapabilities
    171149      {
    172           virtual bool SupportsJoins(){ return false; }
    173           virtual FdoInt32 GetJoinTypes() {return FdoJoinType_None;}
     150          virtual bool SupportsJoins();
     151          virtual FdoInt32 GetJoinTypes();
    174152      }
    175153}}}
     
    180158      class FdoJoinCriteriaCollection : public FdoCollection<FdoJoinCriteria, FdoCommandException>
    181159      {
    182       protected:
    183       /// \cond DOXYGEN-IGNORE
    184           virtual void Dispose();
    185       public:
     160     public:
    186161          /// Default constructor
    187162          FDO_API static FdoJoinCriteriaCollection* Create();
     
    238213      class FdoComputedClassIdentifier : public FdoIdentifier
    239214      {
    240       protected:
    241           /// Constructs a default instance of a computed class identifier.
    242           FdoComputedClassIdentifier();
    243 
    244           /// Constructs an instance of a computed class
    245           /// identifier using the specified arguments.
    246           FdoComputedClassIdentifier(FdoString* name, FdoISelect* select);
    247 
    248           /// Default destructor for computed class identifier.
    249           virtual ~FdoComputedClassIdentifier();
    250 
    251           virtual void Dispose();
    252 
    253215      public:
    254216          /// Constructs a default instance of a computed class identifier.
     
    273235              return FdoItemExpressionType_ComputedClassIdentifier;
    274236          }
    275 
    276       private:
    277           FdoISelect* m_subSelect;
    278237      };
    279238}}}