$name
$name : string
The name of the current table
Abstract class defining database / table creation methods
$driver : \Query\Driver\Driver_Interface
Driver for the current db
__construct(string $name, array $options, \Query\Driver\Driver_Interface $driver) : \Query\Table\Table_Builder
Constructor
string | $name | |
array | $options | |
\Query\Driver\Driver_Interface | $driver |
__invoke(string $name, array $options, \Query\Driver\Driver_Interface $driver) : \Query\Table\Table_Builder
Alias to constructor
string | $name | |
array | $options | |
\Query\Driver\Driver_Interface | $driver |
set_driver(\Query\Driver\Driver_Interface $driver) : \Query\Table\Table_Builder
Set the reference to the current database driver
\Query\Driver\Driver_Interface | $driver |
get_driver() : \Query\Driver\Driver_Interface
Get the current DB Driver
add_column(string $column_name, string $type, array $options) : \Query\Table\Table_Builder
Add a column to the current table
string | $column_name | |
string | $type | |
array | $options |
remove_column(string $column_name) : \Query\Table\Table_Builder
Remove the specified column name from the current table
string | $column_name |
rename_column(string $old_name, string $new_name) : \Query\Table\Table_Builder
Rename the specified column on the current table
string | $old_name | |
string | $new_name |
change_column(string $column_name, string $new_column_type, array $options) : \Query\Table\Table_Builder
Change the specified column on the current table
string | $column_name | |
string | $new_column_type | |
array | $options |
add_index(array $columns, array $options) : \Query\Table\Table_Builder
Add an index to the current table
array | $columns | |
array | $options |
remove_index(array $columns, array $options) : \Query\Table\Table_Builder
Remove an index from the current table
array | $columns | |
array | $options |
remove_index_by_name(string $name) : \Query\Table\Table_Builder
Remove an index by its name from the current table
string | $name |
add_foreign_key(array $columns, string $referenced_table, array $referenced_columns, array $options) : \Query\Table\Table_Builder
Add a foreign key to the current table
array | $columns | |
string | $referenced_table | |
array | $referenced_columns | |
array | $options |
drop_foreign_key(array $columns, string $constraint) : \Query\Table\Table_Builder
Drop the foreign key from the current table
array | $columns | |
string | $constraint |