- 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 TDbTableInfo

    TComponent
       |
       --TDbTableInfo

#### Direct Known Sub-classes:

TMssqlTableInfo , TMysqlTableInfo , TPgsqlTableInfo , TSqliteTableInfo

TDbTableInfo class describes the meta data of a database table.

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

Constructor Summary
public | __construct Array Sets the database table meta data information.

Method Summary
TDbCommandBuilder | createCommandBuilder ( TDbConnection $connection)
TDbTableColumn | getColumn ( string $name)
array | getColumnNames ( array 0)
TMap | getColumns ()
array | getForeignKeys ()
protected mixed | getInfo ( string $name, mixed $default)
boolean | getIsView ()
array | getLowerCaseColumnNames ()
string[] | getPrimaryKeys ()
string | getTableFullName ()
string | getTableName ()
protected void | setInfo ( string $name, mixed $value)

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

Sets the database table meta data information.

Method Details

## createCommandBuilder

public TDbCommandBuilder createCommandBuilder | (TDbConnection $connection )

Input
TDbConnection | $connection | database connection.
Output
TDbCommandBuilder | new command builder
Exception

## getColumn

public TDbTableColumn getColumn | (string $name )

Input
string | $name | column id
Output
TDbTableColumn | column information.
Exception

## getColumnNames

public array getColumnNames | (array 0 )

Input
array | 0 | list of column Id, empty to get all columns.
Output
array | table column names (identifier quoted)
Exception

## getColumns

public TMap getColumns | ()

Output
TMap | TDbTableColumn column meta data.
Exception

## getForeignKeys

public array getForeignKeys | ()

Output
array | tuples of foreign table and column name.
Exception

## getInfo

protected mixed getInfo | (string $name , mixed $default )

Input
string | $name | information array key name
mixed | $default | default value if information array value is null
Output
mixed | information array value.
Exception

## getIsView

public boolean getIsView | ()

Output
boolean | whether the table is a view, default is false.
Exception

## getLowerCaseColumnNames

public array getLowerCaseColumnNames | ()

Output
array | lowercased column key names mapped to normal column ids.
Exception

## getPrimaryKeys

public string[] getPrimaryKeys | ()

Output
string[] | names of primary key columns.
Exception

## getTableFullName

public string getTableFullName | ()

Output
string | full name of the table, database dependent.
Exception

## getTableName

public string getTableName | ()

Output
string | name of the table this column belongs to.
Exception

## setInfo

protected void setInfo | (string $name , mixed $value )

Input
string | $name | information array key name
mixed | $value | new information array value.
Output
Exception