Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

IDSSCatalogDefn Interface Reference

Inherited by IDSSCatalogDefn2.

List of all members.


Detailed Description

IDSSCatalogDefn interface is used to define the selection criteria that the user wants to set for the warehouse catalog.

It is an input to the Warehouse Catalog Engine to instruct the Engine how to retrieve warehouse table and column information.


Public Member Functions

HRESULT CatalogSQL ([in] BSTR iSQL)
 SQL statement template to retrieve table and column information for selected tables.
HRESULT CatalogSQL ([out, retval] BSTR *oSQL)
 SQL statement template to retrieve table and column information for selected tables.
HRESULT Driver ([in] IDispatch *pDriver)
 Not implemented.
HRESULT Driver ([out, retval] IDispatch ppDriver)
 Not implemented.
HRESULT Info ([out, retval] IDSSObjectInfo ppInfo)
 Shortcut to the IDSSObjectInfo interface.
HRESULT Restrict ([in] EnumDSSCatalogRestriction iType,[in, optional] VARIANT iValue)
 Not implemented This method is reserved for future use and is not implemented.
HRESULT TableSQL ([in] BSTR iSQL)
 SQL statement to retrieve all tables from warehouse database.
HRESULT TableSQL ([out, retval] BSTR *oSQL)
 SQL statement to retrieve all tables from warehouse database.
HRESULT Update ([in] IDSSCatalog *pCatalog,[in] EnumDSSCatalogUpdateFlags Flags)
 Update catalog information by running selected SQL.
HRESULT UpdateTables ([out, retval] IDSSDBTables ppTables)
 A collection of tables to be updated This collection stores the tables that the callers want updated in a Table-column Update.


Member Function Documentation

HRESULT IDSSCatalogDefn::CatalogSQL [in] BSTR  iSQL  ) 
 

SQL statement template to retrieve table and column information for selected tables.

This is the SQL statement template used to retrieve all interesting warehouse tables and their columns.

If this property is not set, the Warehouse Catalog Engine uses the default catalog SQL defined for the target warehouse. This property is also used to pass back the default Catalog SQL when the caller performs a GetDefaultSQL update (see Update method).
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSCatalogDefn::CatalogSQL [out, retval] BSTR *  oSQL  ) 
 

SQL statement template to retrieve table and column information for selected tables.

This is the SQL statement template used to retrieve all interesting warehouse tables and their columns.

If this property is not set, the Warehouse Catalog Engine uses the default catalog SQL defined for the target warehouse. This property is also used to pass back the default Catalog SQL when the caller performs a GetDefaultSQL update (see Update method).
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSCatalogDefn::Driver [in] IDispatch *  pDriver  ) 
 

Not implemented.

This method is reserved for future used and is not implemented.

Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSCatalogDefn::Driver [out, retval] IDispatch   ppDriver  ) 
 

Not implemented.

This method is reserved for future used and is not implemented.

Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSCatalogDefn::Info [out, retval] IDSSObjectInfo   ppInfo  ) 
 

Shortcut to the IDSSObjectInfo interface.

Shortcut to the IDSSObjectInfo interface to this object.

Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSCatalogDefn::Restrict [in] EnumDSSCatalogRestriction  iType,
[in, optional] VARIANT  iValue
 

Not implemented This method is reserved for future use and is not implemented.

Returns:
Usual COM result code:
  • E_NOTIMPL

HRESULT IDSSCatalogDefn::TableSQL [in] BSTR  iSQL  ) 
 

SQL statement to retrieve all tables from warehouse database.

This is the SQL statement template used to retrieve a list of warehouse tables that the user is interested in. No column information is retrieved with the SQL. This SQL is the first pass in a two-pass Warehouse Catalog update.

If this property is not set, the Warehouse Catalog Engine uses the default table SQL defined for the target warehouse. This property is also used to pass back the default table SQL when the caller performs a GetDefaultSQL update (see Update method).
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSCatalogDefn::TableSQL [out, retval] BSTR *  oSQL  ) 
 

SQL statement to retrieve all tables from warehouse database.

This is the SQL statement template used to retrieve a list of warehouse tables that the user is interested in. No column information is retrieved with the SQL. This SQL is the first pass in a two-pass Warehouse Catalog update.

If this property is not set, the Warehouse Catalog Engine uses the default table SQL defined for the target warehouse. This property is also used to pass back the default table SQL when the caller performs a GetDefaultSQL update (see Update method).
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSCatalogDefn::Update [in] IDSSCatalog pCatalog,
[in] EnumDSSCatalogUpdateFlags  Flags
 

Update catalog information by running selected SQL.

This method executes TableSQL and/or CatalogSQL against the warehouse database to update selected tables and/or columns. The caller controls the behavior of Update by supplying a Flags parameter. See for details.

Calling Update may change the State and/or definition of tables in the IDSSCatalog::Tables collection. Here is a brief discussion:
  • If a table in the Tables collection is missing (i.e., there is no longer a table that has the same name in the warehouse), this table sets the property Missing to true. The caller may then choose to change the name of this table and clear the Missing flag, or delete it from the Tables collection.
  • If a column in the Columns collection is found to be missing (e.g., either its name or data type is changed in the warehouse), the column also has the property Missing set to true.
  • If the definition of a table in the Tables collection is changed (e.g., its Columns collection changed, or some of the columns that it had have been marked missing), the table has the state flag DssStateDirty set. The caller should make necessary adjustment to the Schema before persisting the new definition.
Before calling the Update method, the caller must make sure that the Catalog object's Warehouse property refers to a DBRole object that is not dirty. Also, for all update types other than DssDbcGetDefaultSQL, all the DBTable and Column objects referred to by the Catalog's Tables and Columns collections respectively must be clean and persisted as well.
DSSDbcUpdate_Flags is an enumeration of the following values that can be used as the Flags parameter:
  • DssDbcUpdateTables
Obtain an updated list of table names only from the warehouse. Calling Update with this flag causes the IDSSCatalog::WHTables collection to be populated. However, each table in the collection has an empty list of columns because column information is not populated with this type of update.
  • DssDbcUpdateAll
Get an updated list of all tables and columns from the warehouse. Calling Update with this flag will cause the IDSSCatalog::WHTables collection to be populated. The Columns collection in each table is also populated.
  • DssDbcUpdateColumns
Update the Columns collection for each table in the UpdateTables collection.
  • DssDbcGetTableContent
Read the content of warehouse tables in the UpdateTables collection.
  • DssDbcGetDefaultSQL
This flag is used to fetch the default SQL statements from the Catalog Engine into this CatalogDefn object. Any existing user-defined SQL will be overwritten. No actual update is performed.
This flag can be OR'd to any of the above three flags to indicate which SQL statement to fetch. E.g, DssDbcGetDefaultSQL + DssDbcUpdateTables fetches ONLY the TablesSQL. If this flag is used alone, all default SQL statements are returned.
  • DssDbcConsolidateColumns
In a normal update involving columns (i.e., DssDbcUpdateColumns or DssDbcUpdateAll), two columns having the same name but different data types are treated as two different DSSColumn objects. However, if DssDbcConsolidateColumns is supplied with any of the Update flags, columns with the same name is always treated as the same object if they have compatible data types (i.e., all numeric, all string-text, etc.). The resulting column object has a common data type for all the corresponding physical columns.
  • DssDbcIgnoreOldDataType
When supplied in conjunction with an update involving columns (i.e., DssDbcUpdateColumns or DssDbcUpdateAll), two columns having the same name are always considered to be the same DSSColumn object. If a column is discovered in the warehouse, which has the same name as that of an existing DSSColumn object but different data types, the existing DSSColumn object is updated to have the data type found in the warehouse.
  • DssDbcUseODBC
When this flag is used with any of the update flags, the warehouse catalog engine will read the catalog information using standard ODBC catalog functions, instead of querying RDBMS system catalog table. Support for ODBC catalog functions varies by ODBC driver and the result may differ from those obtained by using SQL query.
  • DssDbcUpperCaseNames
When this flag is used with any of the update flags, table/column names are matched without regard to letter case.
Parameters:
pCatalog Pointer to the catalog object to be updated.
Flags Specify the type of the update to perform. See Remarks for details.
Returns:
Usual COM result code:
  • S_OK Success.
  • DBCAT_E_DIRTY_OBJECT_EXISTS The DBRole object, or one of more of the DBTable and Columns that the Catalog object refers to, is dirty.

HRESULT IDSSCatalogDefn::UpdateTables [out, retval] IDSSDBTables   ppTables  ) 
 

A collection of tables to be updated This collection stores the tables that the callers want updated in a Table-column Update.

See the Update method for explanation. This collection is not persisted in the metadata.

Returns:
Usual COM result code:
  • S_OK


Copyright © 1996-2018 MicroStrategy Inc. All Rights Reserved.