TTCatalogTable Reference

Each object of the top-level TTCatalog class internally contains an array of TTCatalogTable objects.

Public Members

None

Public Methods

This section summarizes then describes the TTCatalogTable public methods.

Public Methods Summary

Method Description

getColumn()

Returns a constant reference to the TTCatalogColumn corresponding to the ith column in the table.

getIndex()

Returns a constant reference to the TTCatalogIndex object corresponding to the nth index in the table, where n is specified.

getNumColumns()

Returns the number of columns in the table.

getNumIndexes()

Returns the number of indexes on the table.

getNumSpecialColumns()

Returns the number of special columns in this table. See TTCatalogSpecialColumn Usage.

getSpecialColumn()

Returns a special column (TTCatalogSpecialColumn object) from this table, according to the specified column number.

getTableName()

Returns the name of the table.

getTableOwner()

Returns the owner of the table.

getTableType()

Returns the table type as returned by the ODBC SQLTables function.

isSystemTable()

Returns TRUE if the table is a system table.

isUserTable()

Returns TRUE if the table is a user table.

getColumn()

const TTCatalogColumn& getColumn(int cno)

Returns a constant reference to the TTCatalogColumn object corresponding to column number cno in the table. This method is intended to facilitate iteration through all the columns in the table.

The following relationship is true:

0 <= cno < getNumColumns()

getIndex()

const TTCatalogIndex& getIndex(int num)

Returns a constant reference to the TTCatalogIndex object corresponding to index number num in the table. This method is intended to facilitate iteration through all the indexes of the table. The order of the indexes of a table in this array is arbitrary.

The following relationship is true:

0 <= num < getNumIndexes()

getNumColumns()

int getNumColumns()

Returns the number of columns in the table.

getNumIndexes()

int getNumIndexes()

Returns the number of indexes on the table.

getNumSpecialColumns()

int getNumSpecialColumns()

Returns the number of special columns in this TTCatalogTable object. Because TimesTen supports only rowid special columns, this always returns 1.

Also see TTCatalogSpecialColumn Usage.

getSpecialColumn()

const TTCatalogSpecialColumn& getSpecialColumn(int num) const

Returns a special column (TTCatalogSpecialColumn object) from this TTCatalogTable object, according to the specified column number. In TimesTen this can be only a rowid pseudocolumn.

Also see TTCatalogSpecialColumn Usage.

getTableName()

const char* getTableName()

Returns the name of the table.

getTableOwner()

const char* getTableOwner()

Returns the owner of the table.

getTableType()

const char* getTableType() const

Returns the table type of this TTCatalogTable object, as from an ODBC SQLTables call. In TimesTen this may be TABLE, SYSTEM TABLE, VIEW, or SYNONYM.

isSystemTable()

bool isSystemTable()

Returns TRUE if the table is a system table (owned by SYS, TTREP, or GRID), or FALSE otherwise.

The isSystemTable() method and isUserTable() method (described next) are useful for applications that iterate over all tables in a database after a call to TTCatalog::fetchCatalogData(), so that you can filter or annotate tables to differentiate the system and user tables. The TTClasses demo program catalog provides an example of how this can be done. (See About TimesTen Quick Start and Sample Applications.)

isUserTable()

bool isUserTable()

Returns TRUE if this is a user table, which is to say it is not a system table, or FALSE otherwise. Note that isUserTable() returns the opposite of isSystemTable() for any table. The description of isSystemTable() discusses the usage and usefulness of these methods.