## Class TDbMetaData

Description

TDbMetaData is the base class for retrieving metadata information, such as table and columns information, from a database connection.

Use the getTableInfo method to retrieve a table information.

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

Located in /Data/Common/TDbMetaData.php (line 24)

    TComponent
       |
       --TDbMetaData

Direct descendents

Class | Description
--- | ---
TMssqlMetaData | TMssqlMetaData loads MSSQL database table and column information.
TMysqlMetaData | TMysqlMetaData loads Mysql version 4.1.x and 5.x database table and column information.
TOracleMetaData | TOracleMetaData loads Oracle database table and column information.
TPgsqlMetaData | TPgsqlMetaData loads PostgreSQL database table and column information.
TSqliteMetaData | TSqliteMetaData loads SQLite database table and column information.

Method Summary
TDbMetaData __construct (TDbConnection $conn)
TDbCommandBuilder createCommandBuilder ([string $tableName = null])
TDbTableInfo createTableInfo (mixed $tableName)
TDbConnection getDbConnection ()
TDbMetaData getInstance (TDbConnection $conn)
TDbTableInfo getTableInfo ([string $tableName = null])
string getTableInfoClass ()
Methods
Constructor __construct (line 32)

- access: public

TDbMetaData __construct (TDbConnection $conn)

- TDbConnection $conn: database connection.

createCommandBuilder (line 104)

Creates a command builder for a given table name.

- return: command builder instance for the given table.
- access: public

TDbCommandBuilder createCommandBuilder ([string $tableName = null])

- string $tableName: table name.

createTableInfo (line 113)

This method should be implemented by decendent classes.

- return: driver dependent create builder.
- access: protected
- abstract:

TDbTableInfo createTableInfo (mixed $tableName)

Redefined in descendants as:

- TMssqlMetaData::createTableInfo() : Get the column definitions for given table.
- TMysqlMetaData::createTableInfo() : Get the column definitions for given table.
- TOracleMetaData::createTableInfo() : Get the column definitions for given table.
- TPgsqlMetaData::createTableInfo() : Get the column definitions for given table.
- TSqliteMetaData::createTableInfo() : Get the column definitions for given table.

getDbConnection (line 40)

- return: database connection.
- access: public

TDbConnection getDbConnection ()
getInstance (line 50)

Obtain database specific TDbMetaData class using the driver name of the database connection.

- return: database specific TDbMetaData.
- static:
- access: public

TDbMetaData getInstance (TDbConnection $conn)

- TDbConnection $conn: database connection.

getTableInfo (line 87)

Obtains table meta data information for the current connection and given table name.

- return: table information.
- access: public

TDbTableInfo getTableInfo ([string $tableName = null])

- string $tableName: table or view name

getTableInfoClass (line 118)

- return: TDbTableInfo class name.
- access: protected

string getTableInfoClass ()

Redefined in descendants as:

- TMssqlMetaData::getTableInfoClass()
- TMysqlMetaData::getTableInfoClass()
- TOracleMetaData::getTableInfoClass()
- TPgsqlMetaData::getTableInfoClass()
- TSqliteMetaData::getTableInfoClass()

#### 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 Mon, 22 Feb 2010 12:17:35 +0000 by phpDocumentor 1.3.0RC4