Methods summary
public
|
|
public
string
|
|
public
array
|
|
public
|
|
public
Horde_Db_Adapter_Base_TableDefinition
|
#
column( string $name, array $type, mixed $options = array() )
Adds a new column to the table definition.
Adds a new column to the table definition.
Examples:
$def->column('granted', 'boolean');
$def->column('picture', 'binary', 'limit' => 4096);
$def->column('sales_stage', 'string', array('limit' => 20, 'default' => 'new', 'null' => false));
Parameters
- $name
- <p>$type Column type, one of:
autoincrementKey, string, text, integer, float,
datetime, timestamp, time, date, binary, boolean.</p>
- $type
- <p>$options Column options:
- limit: (integer) Maximum column length (string,
text, binary or integer columns only)
- default: (mixed) The column's default value.
You cannot explicitly set the default value to
NULL. Simply leave off this option if you want
a NULL default value.
- null: (boolean) Whether NULL values are allowed
in the column.
- precision: (integer) The number precision
(float columns only).
- scale: (integer) The number scaling (float
columns only).
- unsigned: (boolean) Whether the column is an
unsigned number (integer columns only).
- autoincrement: (boolean) Whether the column is
an autoincrement column. Restrictions are
RDMS specific.</p>
- $options
-
Returns
|
public
|
#
timestamps( )
Adds created_at and updated_at columns to the table.
Adds created_at and updated_at columns to the table.
|
public
|
#
belongsTo( mixed $columns )
Add one or several references to foreign keys
Add one or several references to foreign keys
This method returns self.
|
public
|
#
references( mixed $columns )
Alias for the belongsTo() method
Alias for the belongsTo() method
This method returns self.
|
public
|
#
__call( mixed $method, mixed $arguments )
Use __call to provide shorthand column creation ($this->integer(), etc.)
Use __call to provide shorthand column creation ($this->integer(), etc.)
|
public
|
#
end( )
Wrap up table creation block & create the table
Wrap up table creation block & create the table
|
public
string
|
#
toSql( )
Returns a String whose contents are the column definitions
concatenated together. This string can then be pre and appended to
to generate the final SQL to create the table.
Returns a String whose contents are the column definitions
concatenated together. This string can then be pre and appended to
to generate the final SQL to create the table.
Returns
string
|
public
|
|
public
boolean
|
#
offsetExists( integer $offset )
ArrayAccess: Check if the given offset exists
ArrayAccess: Check if the given offset exists
Parameters
Returns
boolean
Implementation of
ArrayAccess::offsetExists()
|
public
object
|
#
offsetGet( integer $offset )
ArrayAccess: Return the value for the given offset.
ArrayAccess: Return the value for the given offset.
Parameters
Returns
object {@Horde_Db_Adapter_Base_ColumnDefinition
Implementation of
ArrayAccess::offsetGet()
|
public
|
#
offsetSet( integer $offset, mixed $value )
ArrayAccess: Set value for given offset
ArrayAccess: Set value for given offset
Parameters
Implementation of
ArrayAccess::offsetSet()
|
public
|
#
offsetUnset( integer $offset )
ArrayAccess: remove element
ArrayAccess: remove element
Parameters
Implementation of
ArrayAccess::offsetUnset()
|
public
|
#
getIterator( )
Implementation of
IteratorAggregate::getIterator()
|