Changes between Version 44 and Version 45 of FDORfc50


Ignore:
Timestamp:
07/19/10 09:35:02 (14 years ago)
Author:
romicadascalescu
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FDORfc50

    v44 v45  
    4343          * '''Cons''': We need to change all the providers leading to a big effort from everyone.
    4444
    45      * Enhance FdoISelect, add a new method ''!GetJoinCriteria()'' with the default implementation of the method throwing an exception, also add two new methods used to set alias for the main class: !SetAlias() & !GetAlias() having empty implementation (no exception will be thrown here). Providers which want to implement this new method must override it and provide a detailed implementation. Even though FdoISelect is declared as ''interface'' we do not have real interfaces in the FDO C++ API, and abstract methods can co-exist with those that have a default implementation. A good example here are the locking methods on the select command. Most  providers do not support locking and have to provide an empty implementation (usually to throw an exception), creating more code on provider side. A better plan would have provided a default implementation in the FdoISelect base class. Following this idea, this alternative will just modify the FdoISelect base class, allowing providers that that will not support joins to remain unchanged. These providers will inherit the default implementation. Looking at FdoISelect there are already two methods which provide default implementation: !AddRef() and Release(), so adding default implementation for the new method will not be something totally new. As with option 2 above: Two new capability functions will be added to the FDO FdoIConnectionCapabilities Interface so that applications can determine if a provider supports the join criteria, supported join types and sub-selects. These new capabilities would be named: !SupportsJoins(), !GetJoinTypes() & !SupportsSubSelects(). A few other changes must be done in order to handle sub-selects.
     45     * Enhance FdoISelect, add a new method ''!GetJoinCriteria()'' with the default implementation of the method throwing an exception, also add two new methods used to set alias for the main class: !''SetAlias()'' & ''!GetAlias()'' having empty implementation (no exception will be thrown here). Providers which want to implement this new method must override it and provide a detailed implementation. Even though FdoISelect is declared as ''interface'' we do not have real interfaces in the FDO C++ API, and abstract methods can co-exist with those that have a default implementation. A good example here are the locking methods on the select command. Most  providers do not support locking and have to provide an empty implementation (usually to throw an exception), creating more code on provider side. A better plan would have provided a default implementation in the FdoISelect base class. Following this idea, this alternative will just modify the FdoISelect base class, allowing providers that that will not support joins to remain unchanged. These providers will inherit the default implementation. Looking at FdoISelect there are already two methods which provide default implementation: !AddRef() and Release(), so adding default implementation for the new method will not be something totally new. As with option 2 above: Two new capability functions will be added to the FDO FdoIConnectionCapabilities Interface so that applications can determine if a provider supports the join criteria, supported join types and sub-selects. These new capabilities would be named: !SupportsJoins(), !GetJoinTypes() & !SupportsSubSelects(). A few other changes must be done in order to handle sub-selects.
    4646         * '''Pros''': this solution will not add more complexity to the API, we do not need to change any provider.[[BR]]
    4747         * '''Cons''': None.