|
eZ Publish
[trunk]
|
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 18 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 662 of file ezmysqlschema.php.
| eZMysqlSchema::eZMysqlSchema | ( | $ | params | ) |
| eZMysqlSchema::fetchTableFields | ( | $ | table, |
| $ | params | ||
| ) | [private] |
| eZMysqlSchema::fetchTableIndexes | ( | $ | table, |
| $ | params | ||
| ) | [private] |
Definition at line 177 of file ezmysqlschema.php.
Referenced by schema().
| eZMysqlSchema::generateAddFieldSql | ( | $ | table_name, |
| $ | field_name, | ||
| $ | def, | ||
| $ | params | ||
| ) | [private, virtual] |
Implements eZDBSchemaInterface.
Definition at line 418 of file ezmysqlschema.php.
| eZMysqlSchema::generateAddIndexSql | ( | $ | table_name, |
| $ | index_name, | ||
| $ | def, | ||
| $ | params, | ||
| $ | isEmbedded = false |
||
| ) | [private] |
Definition at line 240 of file ezmysqlschema.php.
Referenced by generateTableSQL().
| eZMysqlSchema::generateAlterFieldSql | ( | $ | table_name, |
| $ | field_name, | ||
| $ | def, | ||
| $ | params | ||
| ) | [private, virtual] |
Implements eZDBSchemaInterface.
Definition at line 429 of file ezmysqlschema.php.
| eZMysqlSchema::generateDropIndexSql | ( | $ | table_name, |
| $ | index_name, | ||
| $ | def, | ||
| $ | params | ||
| ) | [private] |
Definition at line 340 of file ezmysqlschema.php.
| eZMysqlSchema::generateDropTable | ( | $ | table, |
| $ | params | ||
| ) | [private] |
Definition at line 639 of file ezmysqlschema.php.
| eZMysqlSchema::generateFieldDef | ( | $ | field_name, |
| $ | def, | ||
| &$ | skip_primary, | ||
| $ | params = null |
||
| ) | [private] |
Definition at line 359 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 567 of file ezmysqlschema.php.
Referenced by generateTableSQL().
| eZMysqlSchema::generateTableSchema | ( | $ | tableName, |
| $ | table, | ||
| $ | params | ||
| ) | [virtual] |
false Implements eZDBSchemaInterface.
Definition at line 440 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 460 of file ezmysqlschema.php.
Referenced by generateTableSchema(), and generateTableSQLList().
| eZMysqlSchema::generateTableSQLList | ( | $ | tableName, |
| $ | table, | ||
| $ | params, | ||
| $ | separateTypes | ||
| ) | [virtual] |
true Implements eZDBSchemaInterface.
Definition at line 448 of file ezmysqlschema.php.
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 649 of file ezmysqlschema.php.
| eZMysqlSchema::parseType | ( | $ | type_info, |
| &$ | length_info | ||
| ) |
Definition at line 225 of file ezmysqlschema.php.
Referenced by fetchTableFields().
| eZMysqlSchema::schema | ( | $ | params = array() | ) | [virtual] |
Gets SQL db schema definition by analyzing the current DB instance and return it in array format. NB: once the schema is generated, it might be cached.
| $params | supported options are 'meta_data' and 'format' |
Implements eZDBSchemaInterface.
Definition at line 31 of file ezmysqlschema.php.
| eZMysqlSchema::schemaName | ( | ) | [virtual] |
Implements eZDBSchemaInterface.
Definition at line 677 of file ezmysqlschema.php.
| eZMysqlSchema::schemaType | ( | ) | [virtual] |
Implements eZDBSchemaInterface.
Definition at line 672 of file ezmysqlschema.php.
| eZMysqlSchema::tableCharsetName | ( | $ | charset | ) |
Definition at line 583 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 613 of file ezmysqlschema.php.
Referenced by generateTableSQL().