Property | Type | Description | |
---|---|---|---|
$typeMap | mapping from abstract column types (keys) to physical column types (values). |
Method | Description | |
---|---|---|
addCommentOnColumn ( $table, $column, $comment ) | ||
addCommentOnTable ( $table, $comment ) | ||
buildLimit ( $limit, $offset ) | ||
checkIntegrity ( boolean $check = true, string $schema = '', string $table = '' ) : string | Builds a SQL statement for enabling or disabling integrity check. | |
createIndex ( $name, $table, $columns, $unique = false ) | ||
dropCommentFromColumn ( $table, $column ) | ||
dropCommentFromTable ( $table ) | ||
dropForeignKey ( string $name, string $table ) : string | Builds a SQL statement for dropping a foreign key constraint. | |
dropPrimaryKey ( string $name, string $table ) : string | Builds a SQL statement for removing a primary key constraint to an existing table. | |
insert ( $table, $columns, &$params ) | ||
renameColumn ( string $table, string $oldName, string $newName ) : string | Builds a SQL statement for renaming a column. | |
resetSequence ( string $tableName, mixed $value = null ) : string | Creates a SQL statement for resetting the sequence value of a table's primary key. |
Method | Description | |
---|---|---|
getColumnDefinition ( string $table, string $column ) : null | string | Gets column definition. |
public checkIntegrity ( boolean $check = true, string $schema = '', string $table = '' ) : string | ||
$check | boolean | whether to turn on or off the integrity check. |
$schema | string | the schema of the tables. Meaningless for MySQL. |
$table | string | the table name. Meaningless for MySQL. |
return | string | the SQL statement for checking integrity |
public dropForeignKey ( string $name, string $table ) : string | ||
$name | string | the name of the foreign key constraint to be dropped. The name will be properly quoted by the method. |
$table | string | the table whose foreign is to be dropped. The name will be properly quoted by the method. |
return | string | the SQL statement for dropping a foreign key constraint. |
public dropPrimaryKey ( string $name, string $table ) : string | ||
$name | string | the name of the primary key constraint to be removed. |
$table | string | the table that the primary key constraint will be removed from. |
return | string | the SQL statement for removing a primary key constraint from an existing table. |
public renameColumn ( string $table, string $oldName, string $newName ) : string | ||
$table | string | the table whose column is to be renamed. The name will be properly quoted by the method. |
$oldName | string | the old name of the column. The name will be properly quoted by the method. |
$newName | string | the new name of the column. The name will be properly quoted by the method. |
return | string | the SQL statement for renaming a DB column. |
public resetSequence ( string $tableName, mixed $value = null ) : string | ||
$tableName | string | the name of the table whose primary key sequence will be reset |
$value | mixed | the value for the primary key of the next new row inserted. If this is not set, the next new row's primary key will have a value 1. |
return | string | the SQL statement for resetting sequence |