Public Member Functions | |
__construct (TableInfo $table, $name, $type=null, $nativeType=null, $size=null, $precision=null, $scale=null, $is_nullable=null, $default=null, $is_auto_increment=null, $vendorInfo=array()) | |
Construct a new ColumnInfo object. | |
__sleep () | |
This "magic" method is invoked upon serialize(). | |
getName () | |
Get column name. | |
getType () | |
Get column type. | |
getNativeType () | |
Gets the native type name. | |
getSize () | |
Get column size. | |
getPrecision () | |
Get column precision. | |
getScale () | |
Get column scale. | |
getDefaultValue () | |
Get the default value. | |
isNullable () | |
Is column nullable? | |
isAutoIncrement () | |
Is column of autoincrement type? | |
getVendorSpecificInfo () | |
Get vendor specific optional information for this column. | |
toString () | |
getTable () | |
Get parent table. | |
Public Attributes | |
$name | |
Column name. | |
$type | |
Column Creole type. | |
$nativeType | |
Column native type. | |
$size | |
Column length. | |
$precision | |
Column presision. | |
$scale | |
Column scale (number of digits after decimal ). | |
$isNullable | |
Is nullable? | |
$defaultValue | |
Default value. | |
$isAutoIncrement | |
Is autoincrement? | |
$table | |
Table. | |
Protected Attributes | |
$vendorSpecificInfo = array() |
Definition at line 30 of file ColumnInfo.php.
ColumnInfo::__construct | ( | TableInfo $ | table, | |
$ | name, | |||
$ | type = null , |
|||
$ | nativeType = null , |
|||
$ | size = null , |
|||
$ | precision = null , |
|||
$ | scale = null , |
|||
$ | is_nullable = null , |
|||
$ | default = null , |
|||
$ | is_auto_increment = null , |
|||
$ | vendorInfo = array() | |||
) |
Construct a new ColumnInfo object.
TableInfo | $table The table that owns this column. | |
string | $name Column name. | |
int | $type Creole type. | |
string | $nativeType Native type name. | |
int | $size Column length. | |
int | $scale Column scale (number of digits after decimal). | |
boolean | $is_nullable Whether col is nullable. | |
mixed | $default Default value. | |
boolean | $is_auto_increment Whether col is of autoIncrement type. |
Definition at line 86 of file ColumnInfo.php.
References $name, $nativeType, $precision, $scale, $size, $type, isAutoIncrement(), and isNullable().
00098 { 00099 $this->table = $table; 00100 $this->name = $name; 00101 $this->type = $type; 00102 $this->nativeType = $nativeType; 00103 $this->size = $size; 00104 $this->precision = $precision; 00105 $this->scale = $scale; 00106 $this->isNullable = $is_nullable; 00107 $this->defaultValue = $default; 00108 $this->isAutoIncrement = $is_auto_increment; 00109 $this->vendorSpecificInfo = $vendorInfo; 00110 }
ColumnInfo::__sleep | ( | ) |
This "magic" method is invoked upon serialize().
Because the Info class hierarchy is recursive, we must handle the serialization and unserialization of this object.
Definition at line 118 of file ColumnInfo.php.
00119 { 00120 return array('name', 'type', 'nativeType', 'size', 'precision', 'isNullable', 'defaultValue'); 00121 }
ColumnInfo::getDefaultValue | ( | ) |
ColumnInfo::getName | ( | ) |
Get column name.
Definition at line 127 of file ColumnInfo.php.
Referenced by TableInfo::addColumn().
ColumnInfo::getNativeType | ( | ) |
ColumnInfo::getPrecision | ( | ) |
ColumnInfo::getScale | ( | ) |
Get column scale.
Scale refers to number of digits after the decimal. Sometimes this is referred to as precision, but precision is the total number of digits (i.e. length).
Definition at line 174 of file ColumnInfo.php.
ColumnInfo::getSize | ( | ) |
ColumnInfo::getTable | ( | ) |
ColumnInfo::getType | ( | ) |
ColumnInfo::getVendorSpecificInfo | ( | ) |
Get vendor specific optional information for this column.
Definition at line 210 of file ColumnInfo.php.
ColumnInfo::isAutoIncrement | ( | ) |
Is column of autoincrement type?
Definition at line 201 of file ColumnInfo.php.
Referenced by __construct().
00202 { 00203 return $this->isAutoIncrement === true; 00204 }
ColumnInfo::isNullable | ( | ) |
Is column nullable?
Definition at line 192 of file ColumnInfo.php.
Referenced by __construct().
00193 { 00194 return $this->isNullable; 00195 }
ColumnInfo::toString | ( | ) |
ColumnInfo::$defaultValue |
ColumnInfo::$isAutoIncrement |
ColumnInfo::$isNullable |
ColumnInfo::$name |
ColumnInfo::$nativeType |
ColumnInfo::$precision |
ColumnInfo::$scale |
Column scale (number of digits after decimal ).
Definition at line 53 of file ColumnInfo.php.
Referenced by __construct().
ColumnInfo::$size |
ColumnInfo::$table |
ColumnInfo::$type |
ColumnInfo::$vendorSpecificInfo = array() [protected] |
Definition at line 71 of file ColumnInfo.php.