- Home
- About
- Testimonials
- Demos
- Download
- Documentation
- Blogs
- Forum
- Support

Packages:
default
System
System.Caching
System.Collections
System.Data
System.Data.ActiveRecord
System.Data.ActiveRecord.Relations
System.Data.ActiveRecord.Scaffold
System.Data.ActiveReecord.Scaffold.InputBuilder
System.Data.Commom.Sqlite
System.Data.Common
System.Data.Common.Mssql
System.Data.Common.Mysql
System.Data.Common.Oracle
System.Data.Common.Pgsql
System.Data.Common.Sqlite
System.Data.DataGateway
System.Data.SqlMap
System.Data.SqlMap.Configuration
System.Data.SqlMap.Statements
System.Exceptions
System.I18N
System.IO
System.Security
System.Util
System.Web
System.Web.Services
System.Web.UI
System.Web.UI.ActiveControls
System.Web.UI.WebControls
System.Web.UI.WebControls.assets
System.Xml
Classes:
TDbCommandBuilder
TDbMetaData
TDbTableColumn
TDbTableInfo
TMssqlCommandBuilder
TMysqlCommandBuilder
TOracleCommandBuilder
TOracleTableInfo
TPgsqlCommandBuilder
TSqliteCommandBuilder

Keyword

# Class TDbMetaData

    TComponent
       |
       --TDbMetaData

#### Direct Known Sub-classes:

TMssqlMetaData , TMysqlMetaData , TPgsqlMetaData , TOracleMetaData , TSqliteMetaData

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.

Since: 3.1
Author: Wei Zhuo <weizho[at]gmail[dot]com>

Constructor Summary
public | __construct Array

Method Summary
TDbCommandBuilder | createCommandBuilder ( string $tableName) Creates a command builder for a given table name.
protected abstract TDbTableInfo | createTableInfo ( mixed $tableName) This method should be implemented by decendent classes.
TDbConnection | getDbConnection ()
TDbMetaData | getInstance ( TDbConnection $conn) Obtain database specific TDbMetaData class using the driver name of the database connection.
TDbTableInfo | getTableInfo ( string $tableName) Obtains table meta data information for the current connection and given table name.
protected string | getTableInfoClass ()

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

Constructor Details

## __construct

public __construct | Array

Method Details

## createCommandBuilder

public TDbCommandBuilder createCommandBuilder | (string $tableName )

Creates a command builder for a given table name.

Input
string | $tableName | table name.
Output
TDbCommandBuilder | command builder instance for the given table.
Exception

## createTableInfo

protected abstract TDbTableInfo createTableInfo | (mixed $tableName )

This method should be implemented by decendent classes.

Input
mixed | $tableName |
Output
TDbTableInfo | driver dependent create builder.
Exception

## getDbConnection

public TDbConnection getDbConnection | ()

Output
TDbConnection | database connection.
Exception

## getInstance

public TDbMetaData getInstance | (TDbConnection $conn )

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

Input
TDbConnection | $conn | database connection.
Output
TDbMetaData | database specific TDbMetaData.
Exception

## getTableInfo

public TDbTableInfo getTableInfo | (string $tableName )

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

Input
string | $tableName | table or view name
Output
TDbTableInfo | table information.
Exception

## getTableInfoClass

protected string getTableInfoClass | ()

Output
string | TDbTableInfo class name.
Exception