Abstract class defining database / table creation methods

package Query
subpackage Table_Builder

 Methods

Constructor

__construct(string $name, array $options = array(), \Query\Driver_Interface $driver = NULL) : \Query\Table_Builder

Parameters

$name

string

$options

array

Returns

add_column()

add_column($column_name, $type = NULL, $options = array()

Parameters

$column_name

$type

$options

add_foreign_key()

add_foreign_key($columns, $referenced_table, $referenced_columns = array('id'), $options = array()

Parameters

$columns

$referenced_table

$referenced_columns

$options

add_index()

add_index($columns, $options = array()

Parameters

$columns

$options

change_column()

change_column($column_name, $new_column_type, $options = array()

Parameters

$column_name

$new_column_type

$options

create()

create() 

drop()

drop() 

drop_foreign_key()

drop_foreign_key($columns, $constraint = NULL

Parameters

$columns

$constraint

exists()

exists() 

get_columns()

get_columns() 

has_column()

has_column($column_name, $options = array()

Parameters

$column_name

$options

has_foreign_key()

has_foreign_key($columns, $constraint = NULL

Parameters

$columns

$constraint

has_index()

has_index($columns, $options = array()

Parameters

$columns

$options

remove_column()

remove_column($column_name) 

Parameters

$column_name

remove_index()

remove_index($columns, $options = array()

Parameters

$columns

$options

remove_index_by_name()

remove_index_by_name($name) 

Parameters

$name

rename()

rename($new_table_name) 

Parameters

$new_table_name

rename_column()

rename_column($old_name, $new_name) 

Parameters

$old_name

$new_name

reset()

reset() 

save()

save() 

update()

update() 

 Properties

 

The name of the current table

$name : string

Default

''
 

Driver for the current db

$driver : \Query\Driver_Interface

Default

NULL
 

Options for the current table

$table_options : array

Default

array()