DSIMetadataSource Class Reference

Exposes raw, unfiltered or partially filtered, catalog metadata data as a table. More...

Inherited by DSIEmptyMetadataSource, DSITableTypeOnlyMetadataSource, DSIExtCatalogSchemasOnlyMetadataSource, DSIExtCatalogsOnlyMetadataSource, DSIExtPartiallyFilteredMetadataSource, DSIExtSchemasOnlyMetadataSource, DSIExtStatisticsMetadataSource, and DSIExtTypeInfoMetadataSource.

List of all members.

Public Member Functions

virtual void CloseCursor ()=0
 Closes the DSI's internal result cursor and clears associated memory.
virtual void GetCustomColumns (std::vector< Simba::DSI::DSICustomMetadataColumn * > &out_customColumns)
 Fills in the input vector with a list of custom column metadata.
virtual bool GetCustomMetadata (simba_uint16 in_columnTag, SqlData *in_data, simba_signed_native in_offset, simba_signed_native in_maxSize)
 Fills in in_data with data for the given custom column in the current row.
virtual bool GetMetadata (Simba::DSI::DSIOutputMetadataColumnTag in_columnTag, SqlData *in_data, simba_signed_native in_offset, simba_signed_native in_maxSize)=0
 Fills in in_data with data for the given column in the current row.
virtual void GetOverriddenColumnMetadata (AutoValueMap< DSIOutputMetadataColumnTag, SqlTypeMetadata > &out_typeMetadata, AutoValueMap< DSIOutputMetadataColumnTag, DSIColumnMetadata > &out_columnMetadata) const
 Gets overridden column & type metadata for standard metadata columns.
virtual simba_unsigned_native GetRowCount ()
 Returns the row count.
virtual bool Move (Simba::DSI::DSIDirection in_direction, simba_signed_native in_offset)=0
 Traverses the result set, moving on to the next row.
virtual void PassdownFilters (std::vector< DSIMetadataFilter * > &in_filters)
 Pass down the metadata filters to give the metadata source implementation a chance to handle some or all of the filters.
virtual ~DSIMetadataSource ()
 Destructor.

Protected Member Functions

 DSIMetadataSource (Simba::DSI::DSIMetadataRestrictions &in_restrictions)
 Constructor.

Protected Attributes

Simba::DSI::DSIMetadataRestrictions m_restrictions

Detailed Description

Exposes raw, unfiltered or partially filtered, catalog metadata data as a table.


Constructor & Destructor Documentation

virtual ~DSIMetadataSource (  )  [virtual]

Destructor.

DSIMetadataSource ( Simba::DSI::DSIMetadataRestrictions in_restrictions  )  [protected]

Constructor.

Parameters:
in_restrictions Restrictions that may be applied to the metadata table.

Member Function Documentation

virtual void CloseCursor (  )  [pure virtual]
virtual void GetCustomColumns ( std::vector< Simba::DSI::DSICustomMetadataColumn * > &  out_customColumns  )  [virtual]

Fills in the input vector with a list of custom column metadata.

The column tag from the custom column metadata is used later to retrieve custom column data via the GetCustomMetadata() method.

Called by the FilteredMetadataResult, notifying it of any custom columns in the metadata table.

NOTE: This default implementation simply voids out_customColumns. Sub-classes of this class should override this method if custom metadata is needed.

Parameters:
out_customColumns Custom column metadata (with metadata column tags attached). Ownership of the custom column metadata is passed onto the caller of this method.
virtual bool GetCustomMetadata ( simba_uint16  in_columnTag,
SqlData in_data,
simba_signed_native  in_offset,
simba_signed_native  in_maxSize 
) [virtual]

Fills in in_data with data for the given custom column in the current row.

The target column is identified by in_columnTag which is obtained from the list of DSICustomMetadataColumn provided in the method GetCustomColumns(). Therefore, proper implementation of GetCustomColumns() and construction of DSICustomMetadataColumn is needed to ensure that the proper column tag gets passed into this GetCustomMetadata() method.

NOTE: This default implementation simply throws an DSIException with id "FuncNotSupported. Sub-classes should override this method if custom metadata is needed.

Parameters:
in_columnTag Identifier that identifies a column.
in_data Holds a buffer to store the requested data. (NOT OWN)
in_offset Number of bytes in the data to skip before copying into in_data.
in_maxSize Maximum number of bytes of data to return in in_data.
Returns:
True if there is more data; false otherwise.
Exceptions:
DSIException because custom metadata is not supported by default.
virtual bool GetMetadata ( Simba::DSI::DSIOutputMetadataColumnTag  in_columnTag,
SqlData in_data,
simba_signed_native  in_offset,
simba_signed_native  in_maxSize 
) [pure virtual]

Fills in in_data with data for the given column in the current row.

The target column is identified by in_columnTag which can be found in DSIMetadataColumnIdentifierDefns.h

Parameters:
in_columnTag Identifier that identifies a column.
in_data Holds a buffer to store the requested data. (NOT OWN)
in_offset Number of bytes in the data to skip before copying into in_data.
in_maxSize Maximum number of bytes of data to return in in_data.
Returns:
True if there is more data; false otherwise.

Implemented in DSIEmptyMetadataSource, DSITableTypeOnlyMetadataSource, DSIExtCatalogSchemasOnlyMetadataSource, DSIExtCatalogsOnlyMetadataSource, DSIExtColumnsMetadataSource, DSIExtSchemasOnlyMetadataSource, DSIExtStatisticsMetadataSource, DSIExtTablesMetadataSource, and DSIExtTypeInfoMetadataSource.

virtual void GetOverriddenColumnMetadata ( AutoValueMap< DSIOutputMetadataColumnTag, SqlTypeMetadata > &  out_typeMetadata,
AutoValueMap< DSIOutputMetadataColumnTag, DSIColumnMetadata > &  out_columnMetadata 
) const [virtual]

Gets overridden column & type metadata for standard metadata columns.

Note: By default, this method is a no-op. You should only override the default implementation if you wish to have non-standard metadata for standard metadata columns.

Parameters:
out_typeMetadata Map to be filled with overridden type metadata.
out_columnMetadata Map to be filled with overridden column metadata.
virtual simba_unsigned_native GetRowCount (  )  [virtual]

Returns the row count.

Returns:
The row count, or Simba::DSI::ROW_COUNT_UNKNOWN if the row count is unknown.
virtual bool Move ( Simba::DSI::DSIDirection  in_direction,
simba_signed_native  in_offset 
) [pure virtual]

Traverses the result set, moving on to the next row.

Parameters:
in_direction Direction to traverse through a result set
in_offset Number of bytes in the data to skip
Returns:
True if there are more rows to traverse; false if there are no more rows left.

Implemented in DSIEmptyMetadataSource, DSITableTypeOnlyMetadataSource, DSIExtCatalogSchemasOnlyMetadataSource, DSIExtCatalogsOnlyMetadataSource, DSIExtColumnsMetadataSource, DSIExtSchemasOnlyMetadataSource, DSIExtStatisticsMetadataSource, DSIExtTablesMetadataSource, and DSIExtTypeInfoMetadataSource.

virtual void PassdownFilters ( std::vector< DSIMetadataFilter * > &  in_filters  )  [virtual]

Pass down the metadata filters to give the metadata source implementation a chance to handle some or all of the filters.

NOTE: If a filter can be handled by the metadata source then it should take ownership of the filter object and remove that filter from the list of filters passed in. If a filter can not be handled by the metadata source then it must be left in the list so it can be handled elsewhere. This default implementation does nothing.

NOTE: An ODBC Catalog function argument is treated as a filter when the argument is a pattern argument (e.g. SchemaName argument of SQLColumns) and the argument string contains one or more wildcard characters (e.g. "%" and "_"). Filters will only be passed down if DSI_FILTER_METADATA_SOURCE property has been set to DSI_FMS_TRUE. Otherwise the argument will be treated as a restriction.

Parameters:
in_filters The list of filters passed down.

Reimplemented in DSIExtPartiallyFilteredMetadataSource.


Member Data Documentation


The documentation for this class was generated from the following file:

Generated on Wed May 17 14:21:15 2017 for SimbaEngine 10.1.3.1011 by simba