Свойство | Type | Description | |
---|---|---|---|
$_charset | |||
$_collate | |||
$_engine | Driver-Specific settings | ||
$_fieldTypeMap | @todo Have to improve this to allow custom types, callbacks, and validation | ||
$_format_date | Format for date columns, formatted for PHP's date() function | ||
$_format_datetime | |||
$_format_time |
Méthode | Description | |
---|---|---|
characterSet ( $charset, $collate = 'utf8_unicode_ci' ) | Set character set and MySQL collate string | |
engine ( $engine = null ) | Set database engine (InnoDB, MyISAM, etc) | |
escapeField ( $field ) | Escape/quote direct user input | |
formatMigrateOptions ( array $options ) | Ensure migration options are full and have all keys required | |
migrateSyntaxFieldCreate ( string $fieldName, array $fieldInfo ) : string | Syntax for each column in CREATE TABLE command | |
migrateSyntaxFieldUpdate ( string $fieldName, array $fieldInfo, $add = false ) : string | Syntax for each column in CREATE TABLE command | |
migrateSyntaxTableCreate ( string $table, array $formattedFields, array $columnsSyntax, array $options ) : string | Syntax for CREATE TABLE with given fields and column syntax | |
migrateSyntaxTableUpdate ( string $table, array $formattedFields, array $columnsSyntax, array $options ) : string | Syntax for ALTER TABLE with given fields and column syntax |
Méthode | Description | |
---|---|---|
getColumnsForTable ( String $table, $source ) : Array | Get columns for current table |
public characterSet ( $charset, $collate = 'utf8_unicode_ci' ) |
public formatMigrateOptions ( array $options ) | ||
$options | array |
protected getColumnsForTable ( String $table, $source ) : Array | ||
$table | String | Table name |
Résultat | Array |
public migrateSyntaxTableCreate ( string $table, array $formattedFields, array $columnsSyntax, array $options ) : string | ||
$table | string | Table name |
$formattedFields | array | Array of fields with all settings |
$columnsSyntax | array | Array of SQL syntax of columns produced by 'migrateSyntaxFieldCreate' function |
$options | array | Options that may affect migrations or how tables are setup |
Résultat | string | SQL syntax |
public migrateSyntaxTableUpdate ( string $table, array $formattedFields, array $columnsSyntax, array $options ) : string | ||
$table | string | Table name |
$formattedFields | array | Array of fields with all settings |
$columnsSyntax | array | Array of SQL syntax of columns produced by 'migrateSyntaxFieldUpdate' function |
$options | array | |
Résultat | string | SQL syntax |
protected $_fieldTypeMap |
protected $_format_date |