__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 |
stringThe name of the column
stringThe type of column
arraySee above for column options that can be set.
compile()
getAutoIncrement() : boolean
booleangetDefault() : mixed
mixedThe default value or null if it hasn't been setgetIsNull() : boolean | null
booleannull
getLength() : string
stringThe length of the columngetName() : string
stringThe column namegetOptions() : array
arrayColumn optionsgetType() : string
stringThe current data typeisPrimaryKey() : boolean
booleanIs this a primary key column?$auto_increment : boolean
$default : string
$is_null : boolean
$length : string
$name : string
$primary_key : boolean
$type : string