|
eZ Publish
[4.2]
|
Handles schemas for MySQL. More...
Inheritance diagram for eZMysqlSchema:
Collaboration diagram for eZMysqlSchema:Public Member Functions | |
| escapeSQLString ($value) | |
| eZMysqlSchema ($params) | |
| generateTableOption ($tableName, $tableDef, $optionType, $optionValue, $params) | |
| generateTableSchema ($tableName, $table, $params) | |
| generateTableSQLList ($tableName, $table, $params, $separateTypes) | |
| isMultiInsertSupported () | |
| parseType ($type_info, &$length_info) | |
| schema ($params=array()) | |
| schemaName () | |
| schemaType () | |
| tableCharsetName ($charset) | |
| tableStorageTypeName ($type) | |
Private Member Functions | |
| fetchTableFields ($table, $params) | |
| fetchTableIndexes ($table, $params) | |
| generateAddFieldSql ($table_name, $field_name, $def, $params) | |
| generateAddIndexSql ($table_name, $index_name, $def, $params, $isEmbedded=false) | |
| generateAlterFieldSql ($table_name, $field_name, $def, $params) | |
| generateDropIndexSql ($table_name, $index_name, $def, $params) | |
| generateDropTable ($table, $params) | |
| generateFieldDef ($field_name, $def, &$skip_primary, $params=null) | |
| generateTableSQL ($tableName, $tableDef, $params, $asArray, $separateTypes=false) | |
Handles schemas for MySQL.
Definition at line 36 of file ezmysqlschema.php.
| eZMysqlSchema::escapeSQLString | ( | $ | value | ) | [virtual] |
This escapes the string according to the current database type and returns it.
Implements eZDBSchemaInterface.
Definition at line 680 of file ezmysqlschema.php.
| eZMysqlSchema::eZMysqlSchema | ( | $ | params | ) |
| eZMysqlSchema::fetchTableFields | ( | $ | table, |
| $ | params | ||
| ) | [private] |
| eZMysqlSchema::fetchTableIndexes | ( | $ | table, |
| $ | params | ||
| ) | [private] |
Definition at line 195 of file ezmysqlschema.php.
Referenced by schema().
| eZMysqlSchema::generateAddFieldSql | ( | $ | table_name, |
| $ | field_name, | ||
| $ | def, | ||
| $ | params | ||
| ) | [private, virtual] |
Implements eZDBSchemaInterface.
Definition at line 436 of file ezmysqlschema.php.
| eZMysqlSchema::generateAddIndexSql | ( | $ | table_name, |
| $ | index_name, | ||
| $ | def, | ||
| $ | params, | ||
| $ | isEmbedded = false |
||
| ) | [private] |
Definition at line 258 of file ezmysqlschema.php.
Referenced by generateTableSQL().
| eZMysqlSchema::generateAlterFieldSql | ( | $ | table_name, |
| $ | field_name, | ||
| $ | def, | ||
| $ | params | ||
| ) | [private, virtual] |
Implements eZDBSchemaInterface.
Definition at line 447 of file ezmysqlschema.php.
| eZMysqlSchema::generateDropIndexSql | ( | $ | table_name, |
| $ | index_name, | ||
| $ | def, | ||
| $ | params | ||
| ) | [private] |
Definition at line 358 of file ezmysqlschema.php.
| eZMysqlSchema::generateDropTable | ( | $ | table, |
| $ | params | ||
| ) | [private] |
Definition at line 657 of file ezmysqlschema.php.
| eZMysqlSchema::generateFieldDef | ( | $ | field_name, |
| $ | def, | ||
| &$ | skip_primary, | ||
| $ | params = null |
||
| ) | [private] |
Definition at line 377 of file ezmysqlschema.php.
Referenced by generateAddFieldSql(), generateAlterFieldSql(), and generateTableSQL().
| eZMysqlSchema::generateTableOption | ( | $ | tableName, |
| $ | tableDef, | ||
| $ | optionType, | ||
| $ | optionValue, | ||
| $ | params | ||
| ) |
Detects known options and generates the MySQL SQL code for it.
false if not known. | $optionType | The type of option, the supported ones are:
|
Definition at line 585 of file ezmysqlschema.php.
Referenced by generateTableSQL().
| eZMysqlSchema::generateTableSchema | ( | $ | tableName, |
| $ | table, | ||
| $ | params | ||
| ) | [virtual] |
false Implements eZDBSchemaInterface.
Definition at line 458 of file ezmysqlschema.php.
| eZMysqlSchema::generateTableSQL | ( | $ | tableName, |
| $ | tableDef, | ||
| $ | params, | ||
| $ | asArray, | ||
| $ | separateTypes = false |
||
| ) | [private] |
| $asArray | If true all SQLs are return in an array, if not they are returned as a string. |
Definition at line 478 of file ezmysqlschema.php.
Referenced by generateTableSchema(), and generateTableSQLList().
| eZMysqlSchema::generateTableSQLList | ( | $ | tableName, |
| $ | table, | ||
| $ | params, | ||
| $ | separateTypes | ||
| ) | [virtual] |
true Implements eZDBSchemaInterface.
Definition at line 466 of file ezmysqlschema.php.
| eZMysqlSchema::isMultiInsertSupported | ( | ) |
MySQL 3.22.5 and higher support multi-insert queries so if the current database has sufficient version we return true. If no database is connected we return true.
Reimplemented from eZDBSchemaInterface.
Definition at line 667 of file ezmysqlschema.php.
| eZMysqlSchema::parseType | ( | $ | type_info, |
| &$ | length_info | ||
| ) |
Definition at line 243 of file ezmysqlschema.php.
Referenced by fetchTableFields().
| eZMysqlSchema::schema | ( | $ | params = array() | ) | [virtual] |
Get SQL db schema
Implements eZDBSchemaInterface.
Definition at line 49 of file ezmysqlschema.php.
| eZMysqlSchema::schemaName | ( | ) | [virtual] |
Implements eZDBSchemaInterface.
Definition at line 695 of file ezmysqlschema.php.
| eZMysqlSchema::schemaType | ( | ) | [virtual] |
Implements eZDBSchemaInterface.
Definition at line 690 of file ezmysqlschema.php.
| eZMysqlSchema::tableCharsetName | ( | $ | charset | ) |
Definition at line 601 of file ezmysqlschema.php.
Referenced by generateTableSQL().
| eZMysqlSchema::tableStorageTypeName | ( | $ | type | ) |
false if not supported.bdb, myisam and innodb.See http://dev.mysql.com/doc/mysql/en/CREATE_TABLE.html for overview of the types MySQL supports
Definition at line 631 of file ezmysqlschema.php.
Referenced by generateTableSQL().