PHP Class Prado\Data\Common\TDbTableColumn

Since: 3.1
Inheritance: extends Prado\TComponent
Exibir arquivo Open project: pradosoft/prado

Public Methods

Method Description
__construct ( $columnInfo ) Sets the table column meta data.
getAllowNull ( ) : boolean
getColumnId ( ) : string
getColumnIndex ( ) : integer
getColumnName ( ) : string
getColumnSize ( ) : string
getDbType ( ) : string
getDefaultValue ( ) : mixed
getIsExcluded ( ) : boolean
getIsForeignKey ( ) : boolean
getIsPrimaryKey ( ) : boolean
getMaxiumNumericConstraint ( )
getNumericPrecision ( ) : string
getNumericScale ( ) : string
getPHPType ( ) : string Returns the derived PHP primitive type from the db type. Default returns 'string'.
getPdoType ( )
getSequenceName ( )
hasSequence ( ) : boolean

Protected Methods

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

Method Details

__construct() public method

Sets the table column meta data.
public __construct ( $columnInfo )

getAllowNull() public method

public getAllowNull ( ) : boolean
return boolean specifies whether value Null is allowed, default is false.

getColumnId() public method

public getColumnId ( ) : string
return string name of the column with quoted identifier.

getColumnIndex() public method

public getColumnIndex ( ) : integer
return integer zero-based ordinal position of the column in the table.

getColumnName() public method

public getColumnName ( ) : string
return string name of the column in the table (identifier quoted).

getColumnSize() public method

public getColumnSize ( ) : string
return string size of the column.

getDbType() public method

public getDbType ( ) : string
return string column type.

getDefaultValue() public method

public getDefaultValue ( ) : mixed
return mixed default column value if column value was null.

getInfo() protected method

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

getIsExcluded() public method

public getIsExcluded ( ) : boolean
return boolean whether this column is excluded from insert and update.

getIsForeignKey() public method

public getIsForeignKey ( ) : boolean
return boolean whether this column is a foreign key, default is false.

getIsPrimaryKey() public method

public getIsPrimaryKey ( ) : boolean
return boolean whether this column is a primary key for the table, default is false.

getMaxiumNumericConstraint() public method

getNumericPrecision() public method

public getNumericPrecision ( ) : string
return string precision of the column data, if the data is numeric.

getNumericScale() public method

public getNumericScale ( ) : string
return string scale of the column data, if the data is numeric.

getPHPType() public method

Returns the derived PHP primitive type from the db type. Default returns 'string'.
public getPHPType ( ) : string
return string derived PHP primitive type from the column db type.

getPdoType() public method

public getPdoType ( )

getSequenceName() public method

public getSequenceName ( )

hasSequence() public method

public hasSequence ( ) : boolean
return boolean whether the column is a sequence.

setInfo() protected method

protected setInfo ( $name, $value )