PHP Class Prado\Data\Common\TDbTableInfo

Since: 3.1
Inheritance: extends Prado\TComponent
显示文件 Open project: pradosoft/prado

Public Methods

Method Description
__construct ( $tableInfo = [], $primary = [], $foreign = [] ) Sets the database table meta data information.
createCommandBuilder ( $connection ) : TDbCommandBuilder
getColumn ( $name ) : TDbTableColumn
getColumnNames ( ) : array
getColumns ( ) : TMap
getForeignKeys ( ) : array
getIsView ( ) : boolean
getLowerCaseColumnNames ( ) : array
getPrimaryKeys ( ) : string[]
getTableFullName ( ) : string
getTableName ( ) : string

Protected Methods

Method Description
getInfo ( $name, $default = null ) : mixed
setInfo ( $name, $value )

Method Details

__construct() public method

Sets the database table meta data information.
public __construct ( $tableInfo = [], $primary = [], $foreign = [] )

createCommandBuilder() public method

public createCommandBuilder ( $connection ) : TDbCommandBuilder
return TDbCommandBuilder new command builder

getColumn() public method

public getColumn ( $name ) : TDbTableColumn
return TDbTableColumn column information.

getColumnNames() public method

public getColumnNames ( ) : array
return array table column names (identifier quoted)

getColumns() public method

public getColumns ( ) : TMap
return Prado\Collections\TMap TDbTableColumn column meta data.

getForeignKeys() public method

public getForeignKeys ( ) : array
return array tuples of foreign table and column name.

getInfo() protected method

protected getInfo ( $name, $default = null ) : mixed
return mixed information array value.

getIsView() public method

public getIsView ( ) : boolean
return boolean whether the table is a view, default is false.

getLowerCaseColumnNames() public method

public getLowerCaseColumnNames ( ) : array
return array lowercased column key names mapped to normal column ids.

getPrimaryKeys() public method

public getPrimaryKeys ( ) : string[]
return string[] names of primary key columns.

getTableFullName() public method

public getTableFullName ( ) : string
return string full name of the table, database dependent.

getTableName() public method

public getTableName ( ) : string
return string name of the table this column belongs to.

setInfo() protected method

protected setInfo ( $name, $value )