| 40 | == !DataStore Capability Support == |
| 41 | |
| 42 | The change to support both provider and datastore level capabilities is done by adding an optional parameter to each of the top-level FdoIConnection capability functions to specify whether the capabilities are for the provider or for the currently connected datastore. The parameter will be a boolean, ''datastoreLevel''. The default if not included will be FALSE, resulting in the current behavior of provider capabilities. This would make this change backwards compatible so that existing code will not need to change. |
| 43 | |
| 44 | This could be an enum rather than a boolean, although I can’t think of any options that we could add to the enum in the future past these two. |
| 45 | |
| 46 | The table below specifies the changes to the above functions. |
| 47 | |
| 48 | '''Updated FdoIConnection Functions''' |
| 49 | |
| 50 | |
| 51 | {{{ |
| 52 | |
| 53 | virtual FDO_API FdoICommandCapabilities * GetCommandCapabilities (bool datastoreLevel = false) = 0 |
| 54 | virtual FDO_API FdoIConnectionCapabilities * GetConnectionCapabilities (bool datastoreLevel = false) = 0 |
| 55 | virtual FDO_API FdoIExpressionCapabilities * GetExpressionCapabilities (bool datastoreLevel = false) = 0 |
| 56 | virtual FDO_API FdoIFilterCapabilities * GetFilterCapabilities (bool datastoreLevel = false) = 0 |
| 57 | virtual FDO_API FdoIGeometryCapabilities * GetGeometryCapabilities (bool datastoreLevel = false) = 0 |
| 58 | virtual FDO_API FdoIRasterCapabilities * GetRasterCapabilities (bool datastoreLevel = false) = 0 |
| 59 | virtual FDO_API FdoISchemaCapabilities * GetSchemaCapabilities (bool datastoreLevel = false) = 0 |
| 60 | |
| 61 | }}} |
| 62 | |
| 63 | If datastore level capabilities are chosen, then the results will reflect any limitations that the datastore has around those capabilities. Command capabilities will return a smaller list of supported commands for example if the datastore is read-only. In this case, commands such as Update will not be returned. |
| 64 | |
| 65 | Datastore level capabilities would only be available after connecting to a datastore. Requesting datastore level capabilities before a successful connection will result in an exception. |
| 66 | |
| 67 | Some capabilities such as thread capability would not be different between provider level and datastore level. |
| 68 | |
| 69 | '''Impact of datastore level capabilities on the above capability sets''' |
| 70 | |
| 71 | ''Command Capabilities'' |
| 72 | |
| 73 | * The set of supported commands for a datastore could be less than for the general provider. A provider may support long transaction commands, but a particular datastore may not support them. |
| 74 | |
| 75 | ''Connection Capabilities'' |
| 76 | |
| 77 | * Of the connection capabilities (see next section), locking and long transactions are ones that typically could be different. |
| 78 | |
| 79 | ''Expression Capabilities'' |
| 80 | |
| 81 | * The expression types supported typically would not change, although the list of supported functions could be different, e.g. ODBC sources could have different sets of supported functions. |
| 82 | |
| 83 | ''Filter Capabilities'' |
| 84 | |
| 85 | * As with expressions, these typically would not change, although there could be cases where spatial filters could be more limited. |
| 86 | |
| 87 | ''Geometry Capabilities'' |
| 88 | |
| 89 | * At this time, this capability would not change for a datastore. However, in the future, different ODBC source could have different capabilities here (currently only point geometry is supported for all ODBC sources), or more advanced geometries may be available with future versions of the Oracle server where the Oracle provider can connect to different Oracle versions. |
| 90 | |
| 91 | ''Raster Capabilities'' |
| 92 | |
| 93 | * Different sources could support different data models. |
| 94 | |
| 95 | ''Schema Capabilities'' |
| 96 | |
| 97 | * At the datastore level, different sources could have different limitations, e.g. different versions of Oracle server or SQL Server, or different ODBC sources. |
| 98 | |