## Class TDbTableColumn

Description

TDbTableColumn class describes the column meta data of the schema for a database table.

- since: 3.1
- version: $Id: TDbTableColumn.php 1869 2007-04-16 02:02:27Z wei $
- author: Wei Zhuo <weizho[at]gmail[dot]com>

Located in /Data/Common/TDbTableColumn.php (line 21)

    TComponent
       |
       --TDbTableColumn

Direct descendents

Class | Description
--- | ---
TMssqlTableColumn | Describes the column metadata of the schema for a Mssql database table.
TMysqlTableColumn | Describes the column metadata of the schema for a Mysql database table.
TOracleTableColumn | Describes the column metadata of the schema for a PostgreSQL database table.
TPgsqlTableColumn | Describes the column metadata of the schema for a PostgreSQL database table.
TSqliteTableColumn | Describes the column metadata of the schema for a PostgreSQL database table.

Class Constant Summary
UNDEFINED_VALUE = INF
Method Summary
TDbTableColumn __construct (array $columnInfo)
boolean getAllowNull ()
string getColumnId ()
integer getColumnIndex ()
string getColumnName ()
string getColumnSize ()
string getDbType ()
mixed getDefaultValue ()
mixed getInfo (string $name, [mixed $default = null])
boolean getIsExcluded ()
boolean getIsForeignKey ()
boolean getIsPrimaryKey ()
void getMaxiumNumericConstraint ()
string getNumericPrecision ()
string getNumericScale ()
void getPdoType (integer 0)
string getPHPType ()
void getSequenceName (string 0)
boolean hasSequence ()
void setInfo (string $name, mixed $value)
Methods
Constructor __construct (line 31)

Sets the table column meta data.

- access: public

TDbTableColumn __construct (array $columnInfo)

- array $columnInfo: table column information.

getAllowNull (line 121)

- return: specifies whether value Null is allowed, default is false.
- access: public

boolean getAllowNull ()
getColumnId (line 89)

- return: name of the column with quoted identifier.
- access: public

string getColumnId ()
getColumnIndex (line 105)

- return: zero-based ordinal position of the column in the table.
- access: public

integer getColumnIndex ()
getColumnName (line 81)

- return: name of the column in the table (identifier quoted).
- access: public

string getColumnName ()
getColumnSize (line 97)

- return: size of the column.
- access: public

string getColumnSize ()
getDbType (line 113)

- return: column type.
- access: public

string getDbType ()
getDefaultValue (line 129)

- return: default column value if column value was null.
- access: public

mixed getDefaultValue ()
getInfo (line 41)

- return: information array value.
- access: protected

mixed getInfo (string $name, [mixed $default = null])

- string $name: information array key name
- mixed $default: default value if information array value is null

getIsExcluded (line 194)

- return: whether this column is excluded from insert and update.
- access: public

boolean getIsExcluded ()

Redefined in descendants as:

- TMssqlTableColumn::getIsExcluded()

getIsForeignKey (line 170)

- return: whether this column is a foreign key, default is false.
- access: public

boolean getIsForeignKey ()
getIsPrimaryKey (line 162)

- return: whether this column is a primary key for the table, default is false.
- access: public

boolean getIsPrimaryKey ()
getMaxiumNumericConstraint (line 150)

- access: public

void getMaxiumNumericConstraint ()
getNumericPrecision (line 137)

- return: precision of the column data, if the data is numeric.
- access: public

string getNumericPrecision ()
getNumericScale (line 145)

- return: scale of the column data, if the data is numeric.
- access: public

string getNumericScale ()
getPdoType (line 67)

- access: public

void getPdoType (integer 0)

- integer 0: PDO bind param/value types, default returns string.

getPHPType (line 59)

Returns the derived PHP primitive type from the db type. Default returns 'string'.

- return: derived PHP primitive type from the column db type.
- access: public

string getPHPType ()

Redefined in descendants as:

- TMssqlTableColumn::getPHPType() : Overrides parent implementation, returns PHP type from the db type.
- TMysqlTableColumn::getPHPType() : Overrides parent implementation, returns PHP type from the db type.
- TOracleTableColumn::getPHPType() : Overrides parent implementation, returns PHP type from the db type.
- TPgsqlTableColumn::getPHPType() : Overrides parent implementation, returns PHP type from the db type.
- TSqliteTableColumn::getPHPType() : Overrides parent implementation, returns PHP type from the db type.

getSequenceName (line 178)

- access: public

void getSequenceName (string 0)

- string 0: sequence name, only applicable if column is a sequence

hasSequence (line 186)

- return: whether the column is a sequence.
- access: public

boolean hasSequence ()

Redefined in descendants as:

- TMssqlTableColumn::hasSequence()
- TMysqlTableColumn::hasSequence()
- TSqliteTableColumn::hasSequence()

setInfo (line 50)

- access: protected

void setInfo (string $name, mixed $value)

- string $name: information array key name
- mixed $value: new information array value.

#### 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::__get()
> TComponent::__set()

Class Constants
UNDEFINED_VALUE = INF (line 23)

Documentation generated on Sun, 30 Sep 2007 19:16:01 -0400 by phpDocumentor 1.3.0RC4