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:
Keyword

Class TDbTableInfo

TComponent
   |
   --TDbTableInfo

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
TDbTableColumn
getColumn ( string $name)
array
getColumnNames ( array 0)
TMap
array
protected  mixed
getInfo ( string $name, mixed $default)
boolean
array
string[]
string
string
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$connectiondatabase connection.
Output
TDbCommandBuilder new command builder
Exception

getColumn

public TDbTableColumn getColumn (string $name )

Input
string$namecolumn id
Output
TDbTableColumn column information.
Exception

getColumnNames

public array getColumnNames (array 0 )

Input
array0list 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$nameinformation array key name
mixed$defaultdefault 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$nameinformation array key name
mixed$valuenew information array value.
Output
Exception