Свойство | Тип | Описание | |
---|---|---|---|
$db_char_set | string | Database character set | |
$fields | array | Fields data | |
$keys | array | Keys data | |
$primary_keys | array | Primary Keys data |
Свойство | Тип | Описание | |
---|---|---|---|
$_create_database | string | CREATE DATABASE statement | |
$_create_table | string | CREATE TABLE statement | |
$_create_table_if | string | CREATE TABLE IF statement | |
$_create_table_keys | boolean | Whether table keys are created from within the CREATE TABLE statement. | |
$_default | string | DEFAULT value representation in CREATE/ALTER TABLE statements | |
$_drop_database | string | DROP DATABASE statement | |
$_drop_table_if | string | DROP TABLE IF EXISTS statement | |
$_null | string | NULL value representation in CREATE/ALTER TABLE statements | |
$_rename_table | string | RENAME TABLE statement | |
$_unsigned | boolean | array | UNSIGNED support | |
$db | object | Database object |
Метод | Описание | |
---|---|---|
__construct ( &$db ) : void | Class constructor | |
add_column ( string $table, array $field, string $_after = NULL ) : boolean | Column Add | |
add_field ( array $field ) : CI_DB_forge | Add Field | |
add_key ( string $key, boolean $primary = FALSE ) : CI_DB_forge | Add Key | |
create_database ( string $db_name ) : boolean | Create database | |
create_table ( string $table, boolean $if_not_exists = FALSE, array $attributes = [] ) : boolean | Create Table | |
drop_column ( string $table, string $column_name ) : boolean | Column Drop | |
drop_database ( string $db_name ) : boolean | Drop database | |
drop_table ( string $table_name, boolean $if_exists = FALSE ) : boolean | Drop Table | |
modify_column ( string $table, string $field ) : boolean | Column Modify | |
rename_table ( string $table_name, string $new_table_name ) : boolean | Rename Table |
Метод | Описание | |
---|---|---|
_alter_table ( string $alter_type, string $table, mixed $field ) : string | string[] | ALTER TABLE | |
_attr_auto_increment ( &$attributes, &$field ) : void | Field attribute AUTO_INCREMENT | |
_attr_default ( &$attributes, &$field ) : void | Field attribute DEFAULT | |
_attr_type ( &$attributes ) : void | Field attribute TYPE | |
_attr_unique ( &$attributes, &$field ) : void | Field attribute UNIQUE | |
_attr_unsigned ( &$attributes, &$field ) : void | Field attribute UNSIGNED | |
_create_table ( string $table, boolean $if_not_exists, array $attributes ) : mixed | Create Table | |
_create_table_attr ( array $attributes ) : string | CREATE TABLE attributes | |
_drop_table ( string $table, boolean $if_exists ) : string | Drop Table | |
_process_column ( array $field ) : string | Process column | |
_process_fields ( boolean $create_table = FALSE ) : array | Process fields | |
_process_indexes ( string $table ) : string | Process indexes | |
_process_primary_keys ( string $table ) : string | Process primary keys | |
_reset ( ) : void | Reset |
protected _attr_auto_increment ( &$attributes, &$field ) : void | ||
Результат | void |
protected _attr_default ( &$attributes, &$field ) : void | ||
Результат | void |
protected _attr_type ( &$attributes ) : void | ||
Результат | void |
protected _attr_unique ( &$attributes, &$field ) : void | ||
Результат | void |
protected _attr_unsigned ( &$attributes, &$field ) : void | ||
Результат | void |
protected _create_table_attr ( array $attributes ) : string | ||
$attributes | array | Associative array of table attributes |
Результат | string |
protected _process_column ( array $field ) : string | ||
$field | array | |
Результат | string |
protected _process_fields ( boolean $create_table = FALSE ) : array | ||
$create_table | boolean | |
Результат | array |
protected _process_indexes ( string $table ) : string | ||
$table | string | |
Результат | string |
protected _process_primary_keys ( string $table ) : string | ||
$table | string | Table name |
Результат | string |
public create_database ( string $db_name ) : boolean | ||
$db_name | string | |
Результат | boolean |
public drop_database ( string $db_name ) : boolean | ||
$db_name | string | |
Результат | boolean |
protected string $_create_database | ||
Результат | string |
protected string $_create_table | ||
Результат | string |
protected string $_create_table_if | ||
Результат | string |
protected bool $_create_table_keys | ||
Результат | boolean |
protected string $_default | ||
Результат | string |
protected string $_drop_database | ||
Результат | string |
protected string $_drop_table_if | ||
Результат | string |
protected string $_null | ||
Результат | string |
protected string $_rename_table | ||
Результат | string |