## Class TDbTableInfo

Description

TDbTableInfo class describes the meta data of a database table.

- since: 3.1
- version: $Id: TDbTableInfo.php 2541 2008-10-21 15:05:13Z qiang.xue $
- author: Wei Zhuo <weizho[at]gmail[dot]com>

Located in /Data/Common/TDbTableInfo.php (line 21)

    TComponent
       |
       --TDbTableInfo

Direct descendents

Class | Description
--- | ---
TMssqlTableInfo | TMssqlTableInfo class provides additional table information for Mssql database.
TMysqlTableInfo | TMysqlTableInfo class provides additional table information for MySQL database.
TPgsqlTableInfo | TPgsqlTableInfo class provides additional table information for PostgreSQL database.
TSqliteTableInfo | TSqliteTableInfo class provides additional table information for PostgreSQL database.

Method Summary
TDbTableInfo __construct ([array $tableInfo = array()], [mixed $primary = array()], [mixed $foreign = array()])
TDbCommandBuilder createCommandBuilder (TDbConnection $connection)
TDbTableColumn getColumn (string $name)
array getColumnNames (array 0)
TMap getColumns ()
array getForeignKeys ()
mixed getInfo (string $name, [mixed $default = null])
boolean getIsView ()
array getLowerCaseColumnNames ()
string[] getPrimaryKeys ()
string getTableFullName ()
string getTableName ()
void setInfo (string $name, mixed $value)
Methods
Constructor __construct (line 36)

Sets the database table meta data information.

- access: public

TDbTableInfo __construct ([array $tableInfo = array()], [mixed $primary = array()], [mixed $foreign = array()])

- array $tableInfo: table column information.

createCommandBuilder (line 48)

- return: new command builder
- access: public

TDbCommandBuilder createCommandBuilder (TDbConnection $connection)

- TDbConnection $connection: database connection.

Redefined in descendants as:

- TMssqlTableInfo::createCommandBuilder()
- TMysqlTableInfo::createCommandBuilder()
- TPgsqlTableInfo::createCommandBuilder()
- TSqliteTableInfo::createCommandBuilder()

getColumn (line 109)

- return: column information.
- access: public

TDbTableColumn getColumn (string $name)

- string $name: column id

getColumnNames (line 120)

- return: table column names (identifier quoted)
- access: public

array getColumnNames (array 0)

- array 0: list of column Id, empty to get all columns.

getColumns (line 100)

- return: TDbTableColumn column meta data.
- access: public

TMap getColumns ()
getForeignKeys (line 139)

- return: tuples of foreign table and column name.
- access: public

array getForeignKeys ()
getInfo (line 59)

- return: information array value.
- access: protected

mixed getInfo (string $name, [mixed $default = null])

- string $name: information array key name
- mixed $default: default value if information array value is null

getIsView (line 92)

- return: whether the table is a view, default is false.
- access: public

boolean getIsView ()
getLowerCaseColumnNames (line 147)

- return: lowercased column key names mapped to normal column ids.
- access: public

array getLowerCaseColumnNames ()
getPrimaryKeys (line 131)

- return: names of primary key columns.
- access: public

string[] getPrimaryKeys ()
getTableFullName (line 84)

- return: full name of the table, database dependent.
- access: public

string getTableFullName ()

Redefined in descendants as:

- TMssqlTableInfo::getTableFullName()
- TMysqlTableInfo::getTableFullName()
- TPgsqlTableInfo::getTableFullName()
- TSqliteTableInfo::getTableFullName()

getTableName (line 76)

- return: name of the table this column belongs to.
- access: public

string getTableName ()
setInfo (line 68)

- access: protected

void setInfo (string $name, mixed $value)

- string $name: information array key name
- mixed $value: new information array value.

#### Inherited Methods

Inherited From TComponent

> TComponent::addParsedObject()
> TComponent::attachEventHandler()
> TComponent::canGetProperty()
> TComponent::canSetProperty()
> TComponent::createdOnTemplate()
> TComponent::detachEventHandler()
> TComponent::evaluateExpression()
> TComponent::evaluateStatements()
> TComponent::getEventHandlers()
> TComponent::getSubProperty()
> TComponent::hasEvent()
> TComponent::hasEventHandler()
> TComponent::hasProperty()
> TComponent::raiseEvent()
> TComponent::setSubProperty()
> TComponent::__get()
> TComponent::__set()

Documentation generated on Sun, 11 Jan 2009 20:22:21 -0500 by phpDocumentor 1.3.0RC4