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.

  • author: Wei Zhuo <weizho[at]gmail[dot]com>
  • version: $Id: TDbMetaData.php 3049 2011-10-16 17:25:14Z GODZilla0480@gmail.com $
  • abstract:
  • since: 3.1

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.
Variable Summary
static array $delimiterIdentifier
Method Summary
TDbMetaData __construct (TDbConnection $conn)
TDbCommandBuilder createCommandBuilder ([string $tableName = null])
TDbTableInfo createTableInfo ( $tableName)
TDbTableInfo getTableInfo ([string $tableName = null])
string getTableInfoClass ()
string quoteColumnAlias (string $name, string $lft, string $rgt)
string quoteColumnName (string $name, string $lft, string $rgt)
string quoteTableName (string $name, string $lft, string $rgt)
Variables
static array $delimiterIdentifier = array('[', ']', '"', '`', "'") (line 32)
  • access: protected
Methods
static method getInstance (line 55)

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

  • return: database specific TDbMetaData.
  • access: public
static TDbMetaData getInstance (TDbConnection $conn)
Constructor __construct (line 37)
  • access: public
TDbMetaData __construct (TDbConnection $conn)
createCommandBuilder (line 109)

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 118)

This method should be implemented by decendent classes.

  • return: driver dependent create builder.
  • abstract:
  • access: protected
TDbTableInfo createTableInfo ( $tableName)
  • $tableName

Redefined in descendants as:
getDbConnection (line 45)
  • return: database connection.
  • access: public
TDbConnection getDbConnection ()
getTableInfo (line 92)

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 123)
  • return: TDbTableInfo class name.
  • access: protected
string getTableInfoClass ()

Redefined in descendants as:
quoteColumnAlias (line 174)

Quotes a column alias for use in a query.

  • return: the properly quoted column alias
  • access: public
string quoteColumnAlias (string $name, string $lft, string $rgt)
  • string $name: column alias
  • string $lft: left delimiter
  • string $rgt: right delimiter

Redefined in descendants as:
quoteColumnName (line 158)

Quotes a column name for use in a query.

  • return: the properly quoted column name
  • access: public
string quoteColumnName (string $name, string $lft, string $rgt)
  • string $name: column name
  • string $lft: left delimiter
  • string $rgt: right delimiter

Redefined in descendants as:
quoteTableName (line 135)

Quotes a table name for use in a query.

  • return: the properly quoted table name
  • access: public
string quoteTableName (string $name, string $lft, string $rgt)
  • string $name: table name
  • string $lft: left delimiter
  • string $rgt: right delimiter

Redefined in descendants as:

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::__call()
TComponent::__get()
TComponent::__set()
TComponent::__sleep()
TComponent::__wakeup()

Documentation generated on Mon, 25 Jun 2012 14:38:01 +0200 by phpDocumentor 1.4.3