Adding Custom Metadata Columns

Each catalog function returns data as a result set. In addition to the ODBC-standard columns that are returned when a catalog function is executed, the data store can return additional columns. Your custom driver can add custom metadata columns to the Metadata result tables in order to support data source-specific data. The DSIMetadataSource-derived classes support custom columns, which are enabled by proper implementations of several functions. These functions are:

GetCustomColumns

GetCustomMetadata

Note:

All custom metadata columns must be of type DSICustomMetadataColumn. The header file for DSICustomerMetadataColumn can be found at [INSTALL_DIRECTORY]\DataAccessComponents\Include\DSI\Client\DSICustomMetadataColumn.h

This feature is only supported in the C++ SDK.

A sample implementation of a custom metadata column for CustomerDSIITablesMetadataSource is shown below. Adding custom metadata columns to any other metadata source follows a similar formula.

Initialize the metadata for the custom columns in the CustomerDSIITablesMetadataSource constructor. Use the static MakeNewSqlTypeMetadata function of the Simba::Support::TypedDataWrapper::SqlTypeMetadataFactory class.