Changes between Version 3 and Version 4 of FDORfc50
- Timestamp:
- 06/02/10 11:10:36 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
FDORfc50
v3 v4 39 39 * '''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. 40 40 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. 42 42 * '''Pro''': this solution will not add more complexity to the API. 43 43 * '''Cons''': We need to change all the providers leading to a big effort from everyone. … … 55 55 * 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: 56 56 * 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 ASNewPropName. 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. 58 58 * !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) 59 59 … … 81 81 }}} 82 82 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. 84 84 85 85 … … 90 90 class FdoJoinCriteria : public FdoIDisposable 91 91 { 92 /// \cond DOXYGEN-IGNORE93 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 108 92 public: 109 93 /// Constructs a default instance of a join criteria. … … 139 123 /// Sets the join filter, e.g. LEFT JOIN rclass ON(filter) 140 124 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;147 125 }; 148 126 … … 170 148 class FdoIConnectionCapabilities 171 149 { 172 virtual bool SupportsJoins() { return false; }173 virtual FdoInt32 GetJoinTypes() {return FdoJoinType_None;}150 virtual bool SupportsJoins(); 151 virtual FdoInt32 GetJoinTypes(); 174 152 } 175 153 }}} … … 180 158 class FdoJoinCriteriaCollection : public FdoCollection<FdoJoinCriteria, FdoCommandException> 181 159 { 182 protected: 183 /// \cond DOXYGEN-IGNORE 184 virtual void Dispose(); 185 public: 160 public: 186 161 /// Default constructor 187 162 FDO_API static FdoJoinCriteriaCollection* Create(); … … 238 213 class FdoComputedClassIdentifier : public FdoIdentifier 239 214 { 240 protected:241 /// Constructs a default instance of a computed class identifier.242 FdoComputedClassIdentifier();243 244 /// Constructs an instance of a computed class245 /// 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 253 215 public: 254 216 /// Constructs a default instance of a computed class identifier. … … 273 235 return FdoItemExpressionType_ComputedClassIdentifier; 274 236 } 275 276 private:277 FdoISelect* m_subSelect;278 237 }; 279 238 }}}