MysqlGrammar
class MysqlGrammar extends AbstractQueryGrammar (View source)
Class MysqlQueryGrammar
Constants
PRIMARY |
|
INDEX |
|
UNIQUE |
|
SPATIAL |
|
FULLTEXT |
|
FOREIGN |
|
Properties
static Query | $query | Property query. |
Methods
static string
build()
build
static string
listDatabases(array $where = null)
showDatabases
static string
createDatabase(string $name, bool $isNotExists = false, string $charset = null, string $collate = null)
createDatabase
static string
dropDatabase(string $db, bool $ifExist = false)
dropTable
static string
showTableColumns(string $table, bool $full = false, string|array $where = null)
showTableColumn
static string
showDbTables(string $dbname, string $where = null)
showDbTables
static string
createTable(string $name, array $columns, array|string $pks = array(), array $keys = array(), null $autoIncrement = null, bool $ifNotExists = true, string $engine = 'InnoDB', string $defaultCharset = 'utf8')
createTable
static string
dropTable(string $table, bool $ifExists = false, string $option = '')
dropTable
static string
alterColumn(string $operation, string $table, string $column, string $type = 'text', bool $signed = true, bool $allowNull = true, null $default = null, null $position = null, string $comment = '')
alterColumn
static string
addColumn(string $table, string $column, string $type = 'text', bool $signed = true, bool $allowNull = true, string $default = null, string $position = null, string $comment = '')
Add column
static string
changeColumn(string $table, string $oldColumn, string $newColumn, string $type = 'text', bool $signed = true, bool $allowNull = true, null $default = null, string $position = null, string $comment = '')
changeColumn
static string
modifyColumn(string $table, string $column, string $type = 'text', bool $signed = true, bool $allowNull = true, null $default = null, string $position = null, string $comment = '')
modifyColumn
static string
dropColumn(string $table, string $column)
dropColumn
static string
addIndex(string $table, string $type, array $columns, string $name, string $comment = null)
addIndex
static string
buildIndexDeclare(string $name, array $columns, string $table = null)
buildIndexDeclare
static string
dropIndex(string $table, string $name)
dropIndex
static string
replace(string $name, array $columns = array(), array $values = array())
replace
Details
in AbstractQueryGrammar at line line 39
static QueryGrammarInterface
getInstance(string $name)
getInstance
at line line 447
static string
build()
build
at line line 43
static string
listDatabases(array $where = null)
showDatabases
at line line 60
static string
createDatabase(string $name, bool $isNotExists = false, string $charset = null, string $collate = null)
createDatabase
at line line 81
static string
dropDatabase(string $db, bool $ifExist = false)
dropTable
at line line 101
static string
showTableColumns(string $table, bool $full = false, string|array $where = null)
showTableColumn
at line line 122
static string
showDbTables(string $dbname, string $where = null)
showDbTables
at line line 149
static string
createTable(string $name, array $columns, array|string $pks = array(), array $keys = array(), null $autoIncrement = null, bool $ifNotExists = true, string $engine = 'InnoDB', string $defaultCharset = 'utf8')
createTable
at line line 221
static string
dropTable(string $table, bool $ifExists = false, string $option = '')
dropTable
at line line 248
static string
alterColumn(string $operation, string $table, string $column, string $type = 'text', bool $signed = true, bool $allowNull = true, null $default = null, null $position = null, string $comment = '')
alterColumn
at line line 283
static string
addColumn(string $table, string $column, string $type = 'text', bool $signed = true, bool $allowNull = true, string $default = null, string $position = null, string $comment = '')
Add column
at line line 304
static string
changeColumn(string $table, string $oldColumn, string $newColumn, string $type = 'text', bool $signed = true, bool $allowNull = true, null $default = null, string $position = null, string $comment = '')
changeColumn
at line line 326
static string
modifyColumn(string $table, string $column, string $type = 'text', bool $signed = true, bool $allowNull = true, null $default = null, string $position = null, string $comment = '')
modifyColumn
at line line 340
static string
dropColumn(string $table, string $column)
dropColumn
at line line 363
static string
addIndex(string $table, string $type, array $columns, string $name, string $comment = null)
addIndex
at line line 389
static string
buildIndexDeclare(string $name, array $columns, string $table = null)
buildIndexDeclare
at line line 430
static string
dropIndex(string $table, string $name)
dropIndex
at line line 505
static string
replace(string $name, array $columns = array(), array $values = array())
replace