Property | Type | Description | |
---|---|---|---|
$reservedWords | string[] | List of reserved MySQL identifiers. | |
$systemColumns | string[] | When you alter this, ensure to also change @link{TableManipulation::STATEMENT_CREATE_TABLE} above. |
Method | Description | |
---|---|---|
addIndex ( string $strTableName, string $strIndexType, string $strColName ) : void | Add a index to given tablename for specified columnname | |
checkColumnDoesNotExist ( string $strTableName, string $strColName, boolean $blnAllowSystemCol = false ) : void | Checks whether the given column does not exist. | |
checkColumnExists ( string $strTableName, string $strColName, boolean $blnAllowSystemCol = false ) : void | Checks whether the given table exists. | |
checkColumnName ( string $strColName, boolean $blnAllowSystemCol = false ) : void | Checks whether the column with the given name is not a MetaModel system column and is a valid column name. | |
checkTableDoesNotExist ( string $strTableName ) : void | Ensures that the given table does not exist. | |
checkTableExists ( string $strTableName ) : void | Checks whether the given table exists. | |
checkTablename ( string $strTableName ) : void | Checks whether the given table name is valid. | |
createColumn ( string $strTableName, string $strColumnName, string $strType, boolean $blnAllowSystemCol = false ) : void | Add a column to a table. | |
createTable ( string $strTableName ) : void | Creates a table with the given name. | |
deleteTable ( string $strTableName ) : void | Deletes the table with the given name. | |
dropColumn ( string $strTableName, string $strColumnName, boolean $blnAllowSystemCol = false ) : void | Delete a column from a table. | |
isReservedWord ( string $word ) : boolean | Test if the given word is a reserved MySQL word. | |
isSystemColumn ( string $strColName ) : boolean | Checks whether the column with the given name is a MetaModel system column. | |
isValidColumnName ( string $strColName ) : boolean | Checks whether the column with the given name is a MetaModel system column. | |
isValidMySQLIdentifier ( string $strName ) : boolean | Ensure that an identifier is valid in MySQL context. | |
isValidTablename ( string $strTableName ) : boolean | Checks whether the given table name is valid. | |
renameColumn ( string $strTableName, string $strColumnName, string $strNewColumnName, string $strNewType, boolean $blnAllowSystemCol = false ) : void | Rename a column and/or change it's type in a table. | |
renameTable ( string $strTableName, string $strNewTableName ) : void | Renames a table with the given name to the given new name. | |
setVariantSupport ( string $strTableName, boolean $blnVariantSupport ) : void | Enables or disables Variant support on a certain MetaModel table. |
Method | Description | |
---|---|---|
getDB ( ) : Database | Returns the Contao database instance to use. |
public static checkColumnDoesNotExist ( string $strTableName, string $strColName, boolean $blnAllowSystemCol = false ) : void | ||
$strTableName | string | The table name to check. |
$strColName | string | The column name to check. |
$blnAllowSystemCol | boolean | If this is set to true, no system column name checking will be applied. |
return | void |
public static checkColumnExists ( string $strTableName, string $strColName, boolean $blnAllowSystemCol = false ) : void | ||
$strTableName | string | The table name to check. |
$strColName | string | The column name to check. |
$blnAllowSystemCol | boolean | If this is set to true, no system column name checking will be applied. |
return | void |
public static checkTableDoesNotExist ( string $strTableName ) : void | ||
$strTableName | string | The table name to check. |
return | void |
public static checkTableExists ( string $strTableName ) : void | ||
$strTableName | string | The table name to check. |
return | void |
public static checkTablename ( string $strTableName ) : void | ||
$strTableName | string | The table name to check. |
return | void |
public static createColumn ( string $strTableName, string $strColumnName, string $strType, boolean $blnAllowSystemCol = false ) : void | ||
$strTableName | string | The name of the table to add the column to. |
$strColumnName | string | The name of the new column. |
$strType | string | The SQL type notation of the new column. |
$blnAllowSystemCol | boolean | If this is set to true, no system column name checking will be applied. |
return | void |
public static createTable ( string $strTableName ) : void | ||
$strTableName | string | The name of the new table to create. |
return | void |
public static deleteTable ( string $strTableName ) : void | ||
$strTableName | string | The name of the new table to delete. |
return | void |
public static dropColumn ( string $strTableName, string $strColumnName, boolean $blnAllowSystemCol = false ) : void | ||
$strTableName | string | The name of the table the column is in. |
$strColumnName | string | The name of the column to drop. |
$blnAllowSystemCol | boolean | If this is set to true, no system column name checking will be applied. |
return | void |
protected static getDB ( ) : Database | ||
return | Database | the database instance. |
public static isReservedWord ( string $word ) : boolean | ||
$word | string | The word to test. |
return | boolean |
public static isSystemColumn ( string $strColName ) : boolean | ||
$strColName | string | The name of the column. |
return | boolean | true if the column is a system column, false otherwise. |
public static isValidColumnName ( string $strColName ) : boolean | ||
$strColName | string | The name of the column. |
return | boolean | true if the column is a system column, false otherwise. |
public static isValidMySQLIdentifier ( string $strName ) : boolean | ||
$strName | string | The identifier to check. |
return | boolean |
public static isValidTablename ( string $strTableName ) : boolean | ||
$strTableName | string | The table name to check. |
return | boolean | true if the table name is valid, false otherwise. |
public static renameColumn ( string $strTableName, string $strColumnName, string $strNewColumnName, string $strNewType, boolean $blnAllowSystemCol = false ) : void | ||
$strTableName | string | The name of the table the column is in. |
$strColumnName | string | The current name of the column to be renamed. |
$strNewColumnName | string | The new name for the column. |
$strNewType | string | The new SQL type notation of the column. |
$blnAllowSystemCol | boolean | If this is set to true, no system column name checking will be applied. |
return | void |
protected static string[] $reservedWords | ||
return | string[] |