__construct()
addOption()
compile()
getAutoIncrement()
getDefault()
getIsNull()
getLength()
getName()
getOptions()
getType()
isPrimaryKey()
setAutoIncrement()
setDefault()
setIsNull()
setLength()
setName()
setOptions()
setType()
$auto_increment
$default
$is_null
$length
$name
$options
$primary_key
$type
A class to define columns
package | Peyote |
---|---|
author | Dave Widmer |
__construct(string $name, string $type, array $options)
Key | Type | Description |
---|---|---|
is_null | boolean | Can this column be null? |
length | string | The length of a field (number fields) |
options | array | A list of data type options (UNSIGNED, ZEROFILL, etc...) |
auto_increment | boolean | Auto Increment the column? |
default | string | The default value for the column |
string
The name of the column
string
The type of column
array
See above for column options that can be set.
compile()
getAutoIncrement() : boolean
boolean
getDefault() : mixed
mixed
The default value or null if it hasn't been setgetIsNull() : boolean | null
boolean
null
getLength() : string
string
The length of the columngetName() : string
string
The column namegetOptions() : array
array
Column optionsgetType() : string
string
The current data typeisPrimaryKey() : boolean
boolean
Is this a primary key column?$auto_increment : boolean
$default : string
$is_null : boolean
$length : string
$name : string
$primary_key : boolean
$type : string