Changes between Version 23 and Version 24 of FDORfc20


Ignore:
Timestamp:
Jun 23, 2008, 11:01:34 AM (16 years ago)
Author:
thomasknoell
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FDORfc20

    v23 v24  
    3535
    3636
    37 '''''Introduce the support for data store level capabilities (currently, only provider level capabilities are available)'''''
    38 
    39 There are cases where a provider may indicate the support of a capability when in fact the data store the provider connects to is not capable of actually supporting it. For example, a provider may indicate that it supports locking or writing to a data store although the data store my not be able to handle locking or has a read-only flag being set and hence writing to it would not be possible. Another example would be the ODBC provider. Currently, the capabilities indicate to support almost all of the functionality. However, since the provider can connect to a variaty of different data sources (from Excel and Access to various RDBMS'), the capabilities may be different dependening on the source the provider connects to.
    40 
    41 As a result, it is not sufficient enough to just report provider level capabilities; it is also needed to report data store level capabilities. Data store level capabilities would be available only once a provider has a fully formed connection established to a data store.
    42 
    43 
    4437'''''Change the capability interface set to allow the addition of new capabilities without changing the interface set'''''
    4538
     
    4942== Proposals ==
    5043
    51 This section outlines the proposed changes to the FDO capability interfaces related to the three objectives to be addressed.
     44This section outlines the proposed changes to the FDO capability interfaces related to the objectives to be addressed.
    5245
    5346
     
    8982  public:
    9083
    91    FDO_API virtual bool      GetBooleanCapability (FdoInt32 capability,                   bool &isUnknown) = 0;
    92    FDO_API virtual FdoInt32  GetInt32Capability   (FdoInt32 capability,                   bool &isUnknown) = 0;
    93    FDO_API virtual FdoInt64  GetInt64Capability   (FdoInt32 capability,                   bool &isUnknown) = 0;
    94    FDO_API virtual FdoString *GetStringCapability (FdoInt32 capability,                   bool &isUnknown) = 0;
    95    FDO_API virtual FdoInt32  *GetArrayCapability  (FdoInt32 capability, FdoInt32 &length, bool &isUnknown) = 0;
    96    FDO_API virtual void      *GetObjectCapability (FdoInt32 capability,                   bool &isUnknown) = 0;
     84   FDO_API virtual bool      GetBooleanCapability (FdoInt32 capability,                   bool *isUnknown) = 0;
     85   FDO_API virtual FdoInt32  GetInt32Capability   (FdoInt32 capability,                   bool *isUnknown) = 0;
     86   FDO_API virtual FdoInt64  GetInt64Capability   (FdoInt32 capability,                   bool *isUnknown) = 0;
     87   FDO_API virtual FdoString *GetStringCapability (FdoInt32 capability,                   bool *isUnknown) = 0;
     88   FDO_API virtual FdoInt32  *GetArrayCapability  (FdoInt32 capability, FdoInt32 &length, bool *isUnknown) = 0;
     89   FDO_API virtual void      *GetObjectCapability (FdoInt32 capability,                   bool *isUnknown) = 0;
    9790
    9891}  //  FdoICapability
     
    108101{{{
    109102
    110 FDO_API virtual FdoICapability *GetCapability(bool datastoreLevel = false) = 0;
     103FDO_API virtual FdoICapability *GetCapability() = 0;
    111104
    112105}}}
     
    125118...
    126119
    127 NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::ICapability *GetCapability(System::Boolean datastoreLevel);
     120NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::ICapability *GetCapability();
    128121
    129122...
     
    160153                                       FdoCapabilityType_DataTypes,
    161154                                       listCount,
    162                                        isUnknown);
     155                                       &isUnknown);
    163156
    164157}}}
     
    454447
    455448
    456 === Data Store Level Capability Support ===
    457 
    458 To support both, provider and data store level capabilities, the parameter list of the functions defined for the FdoIConnection interface that provide access to the capabilities will be changed. All functions will get an optional
    459 boolean parameter that defines the capability level to be requested. The following shows the proposed changes:
    460 
    461 {{{
    462 
    463 FDO_API virtual FdoICommandCapabilities    *GetCommandCapabilities    (bool datastoreLevel = false) = 0;
    464 FDO_API virtual FdoIConnectionCapabilities *GetConnectionCapabilities (bool datastoreLevel = false) = 0;
    465 FDO_API virtual FdoIExpressionCapabilities *GetExpressionCapabilities (bool datastoreLevel = false) = 0;
    466 FDO_API virtual FdoIFilterCapabilities     *GetFilterCapabilities     (bool datastoreLevel = false) = 0;
    467 FDO_API virtual FdoIGeometryCapabilities   *GetGeometryCapabilities   (bool datastoreLevel = false) = 0;
    468 FDO_API virtual FdoIRasterCapabilities     *GetRasterCapabilities     (bool datastoreLevel = false) = 0;
    469 FDO_API virtual FdoISchemaCapabilities     *GetSchemaCapabilities     (bool datastoreLevel = false) = 0;
    470 FDO_API virtual FdoITopologyCapabilities   *GetTopologyCapabilities   (bool datastoreLevel = false) = 0;
    471 FDO_API virtual FdoICapability             *GetCapability             (bool datastoreLevel = false) = 0;
    472 
    473 }}}
    474 
    475 By default the optional parameter is set to FALSE, hence not changing the current behavior. Data store level capabilities are available only after a fully connection to a data store has been established. If requested before, an
    476 exception will be issued.
    477 
    478 The changes to the unmanaged code requires a corresponding change to the managed code. There, new interfaces will be defined to reflect the parameter change in the unmanaged code. The following outlines the necessary changes:
    479 
    480 {{{
    481 
    482 NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::ICommandCapabilities    *GetCommandCapabilities    (System::Boolean datastoreLevel);
    483 NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::IConnectionCapabilities *GetConnectionCapabilities (System::Boolean datastoreLevel);
    484 NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::IExpressionCapabilities *GetExpressionCapabilities (System::Boolean datastoreLevel);
    485 NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::IFilterCapabilities     *GetFilterCapabilities     (System::Boolean datastoreLevel);
    486 NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::IGeometryCapabilities   *GetGeometryCapabilities   (System::Boolean datastoreLevel);
    487 NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::IRasterCapabilities     *GetRasterCapabilities     (System::Boolean datastoreLevel);
    488 NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::ISchemaCapabilities     *GetSchemaCapabilities     (System::Boolean datastoreLevel);
    489 NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::ITopologyCapabilities   *GetTopologyCapabilities   (System::Boolean datastoreLevel);
    490 NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::ICapability             *GetCapability             (System::Boolean datastoreLevel);
    491 
    492 }}}
    493 
    494 If data store level capabilities are chosen, then the results will reflect any limitations that the data store has related to the capability. For example, the command capability will return a smaller list of supported commands if the datastore is read-only. In this case, commands such as Update will not be returned. Other capabilities, like the threat related capabilities, will remain unchanged from the provider level values.
    495 
    496 It is anticipated that the most impact of the data store level capabilities will be with the ODBC provider. At the same time, the ODBC provider also represents the biggest risk as it is not yet known how much data store specific
    497 limitations the ODBC provider can determine through the ODBC API.
    498 
    499 
    500449=== Eliminate Provider Specific Processing in Applications ===
    501450
     
    519468  public:
    520469
    521    FDO_API virtual bool      GetBooleanCapability (FdoInt32 capability,                   bool &isUnknown) = 0;
    522    FDO_API virtual bool      GetBooleanCapability (FdoInt32 capability, FdoString *value, bool &isUnknown) = 0;
     470   FDO_API virtual bool      GetBooleanCapability (FdoInt32 capability,                   bool *isUnknown) = 0;
     471   FDO_API virtual bool      GetBooleanCapability (FdoInt32 capability, FdoString *value, bool *isUnknown) = 0;
    523472
    524473   :
     
    548497}}}
    549498
    550 In addition to those changes the capability identifier ''!FdoCapabilityTYpe_CSSupportsArcs'' will be added to the enumeration ''!FdoCapabilityType'' and the corresponding identifier ''!CapabilityTYpe_CSSupportsArcs'' to the enumeration ''!CapabilityType''.
     499In addition to those changes the capability identifier ''!FdoCapabilityType_CSSupportsArcs'' will be added to the enumeration ''!FdoCapabilityType'' and the corresponding identifier ''!CapabilityType_CSSupportsArcs'' to the enumeration ''!CapabilityType''.
    551500
    552501