|
eZ Publish
[4.2]
|
The eZMySQLiDB class provides MySQL implementation of the database interface. More...
Inheritance diagram for eZMySQLiDB:
Collaboration diagram for eZMySQLiDB:Public Member Functions | |
| arrayQuery ($sql, $params=array(), $server=false) | |
| availableDatabases () | |
| beginQuery () | |
| bindingType () | |
| bindVariable ($value, $fieldDef=false) | |
| bitAnd ($arg1, $arg2) | |
| bitOr ($arg1, $arg2) | |
| checkCharset ($charset, &$currentCharset) | |
| close () | |
| commitQuery () | |
| concatString ($strings=array()) | |
| createDatabase ($dbName) | |
| databaseClientVersion () | |
| databaseName () | |
| databaseServerVersion () | |
| dropTempTable ($dropTableQuery= '', $server=self::SERVER_SLAVE) | |
| escapeString ($str) | |
| eZMySQLiDB ($parameters) | |
| eZTableList ($server=eZDBInterface::SERVER_MASTER) | |
| isCharsetSupported ($charset) | |
| lastSerialID ($table=false, $column=false) | |
| lock ($table) | |
| md5 ($str) | |
| query ($sql, $server=false) | |
| relationCount ($relationType=eZDBInterface::RELATION_TABLE) | |
| relationCounts ($relationMask) | |
| relationList ($relationType=eZDBInterface::RELATION_TABLE) | |
| relationMatchRegexp ($relationType) | |
| removeDatabase ($dbName) | |
| removeRelation ($relationName, $relationType) | |
| rollbackQuery () | |
| setError () | |
| subString ($string, $from, $len=null) | |
| supportedRelationTypeMask () | |
| supportedRelationTypes () | |
| supportsDefaultValuesInsertion () | |
| unlock () | |
Public Attributes | |
| $CharsetMapping | |
Protected Attributes | |
| $TempTableList | |
Private Member Functions | |
| checkCharsetPriv ($charset, &$currentCharset) | |
| connect ($server, $db, $user, $password, $socketPath, $charset=null, $port=false) | |
The eZMySQLiDB class provides MySQL implementation of the database interface.
eZMySQLiDB is the MySQL implementation of eZDB.
Definition at line 42 of file ezmysqlidb.php.
| eZMySQLiDB::arrayQuery | ( | $ | sql, |
| $ | params = array(), |
||
| $ | server = false |
||
| ) | [virtual] |
Executes an SQL query and returns the result as an array of accociative arrays.
| $sql | SQL query to execute. |
| $params | Associative array containing extra parameters, can contain:
|
| $server | Which server to execute the query on, either eZDBInterface::SERVER_MASTER or eZDBInterface::SERVER_SLAVE |
An example would be:
$db->arrayQuery( 'SELECT * FROM eztable', array( 'limit' => 10, 'offset' => 5 ) );
Implements eZDBInterface.
Definition at line 461 of file ezmysqlidb.php.
| eZMySQLiDB::availableDatabases | ( | ) |
Return alvailable databases in database.
Reimplemented from eZDBInterface.
Definition at line 807 of file ezmysqlidb.php.
| eZMySQLiDB::beginQuery | ( | ) |
The query to start the transaction.
Reimplemented from eZDBInterface.
Definition at line 721 of file ezmysqlidb.php.
| eZMySQLiDB::bindingType | ( | ) | [virtual] |
Returns type of binding used in database plugin.
Implements eZDBInterface.
Definition at line 198 of file ezmysqlidb.php.
| eZMySQLiDB::bindVariable | ( | $ | value, |
| $ | fieldDef = false |
||
| ) | [virtual] |
| eZMySQLiDB::bitAnd | ( | $ | arg1, |
| $ | arg2 | ||
| ) | [virtual] |
Implements eZDBInterface.
Definition at line 568 of file ezmysqlidb.php.
| eZMySQLiDB::bitOr | ( | $ | arg1, |
| $ | arg2 | ||
| ) | [virtual] |
Implements eZDBInterface.
Definition at line 573 of file ezmysqlidb.php.
| eZMySQLiDB::checkCharset | ( | $ | charset, |
| &$ | currentCharset | ||
| ) |
Checks if the requested character set matches the one used in the database.
true if it matches or false if it differs. | [out] | $currentCharset | The charset that the database uses. will only be set if the match fails. Note: This will be specific to the database. |
Reimplemented from eZDBInterface.
Definition at line 219 of file ezmysqlidb.php.
| eZMySQLiDB::checkCharsetPriv | ( | $ | charset, |
| &$ | currentCharset | ||
| ) | [private] |
Definition at line 248 of file ezmysqlidb.php.
Referenced by checkCharset().
| eZMySQLiDB::close | ( | ) | [virtual] |
Will close the database connection.
Implements eZDBInterface.
Definition at line 766 of file ezmysqlidb.php.
| eZMySQLiDB::commitQuery | ( | ) |
The query to commit the transaction.
Reimplemented from eZDBInterface.
Definition at line 729 of file ezmysqlidb.php.
| eZMySQLiDB::concatString | ( | $ | strings = array() | ) | [virtual] |
Implements eZDBInterface.
Definition at line 557 of file ezmysqlidb.php.
| eZMySQLiDB::connect | ( | $ | server, |
| $ | db, | ||
| $ | user, | ||
| $ | password, | ||
| $ | socketPath, | ||
| $ | charset = null, |
||
| $ | port = false |
||
| ) | [private] |
Opens a new connection to a MySQL database and returns the connection
Definition at line 117 of file ezmysqlidb.php.
Referenced by eZMySQLiDB().
| eZMySQLiDB::createDatabase | ( | $ | dbName | ) | [virtual] |
| eZMySQLiDB::databaseClientVersion | ( | ) | [virtual] |
false if no version could be retrieved/ Implements eZDBInterface.
Definition at line 851 of file ezmysqlidb.php.
| eZMySQLiDB::databaseName | ( | ) | [virtual] |
Returns the name of driver, this is used to determine the name of the database type. For instance multiple implementations of the MySQL database will all return 'mysql'.
Implements eZDBInterface.
Definition at line 193 of file ezmysqlidb.php.
| eZMySQLiDB::databaseServerVersion | ( | ) |
false if no version could be retrieved/ Reimplemented from eZDBInterface.
Definition at line 836 of file ezmysqlidb.php.
Referenced by checkCharset().
| eZMySQLiDB::dropTempTable | ( | $ | dropTableQuery = '', |
| $ | server = self::SERVER_SLAVE |
||
| ) |
Drop temporary table
Reimplemented from eZDBInterface.
Definition at line 871 of file ezmysqlidb.php.
| eZMySQLiDB::escapeString | ( | $ | str | ) | [virtual] |
Will escape a string so it's ready to be inserted in the database.
Implements eZDBInterface.
Definition at line 753 of file ezmysqlidb.php.
| eZMySQLiDB::eZMySQLiDB | ( | $ | parameters | ) |
Create a new eZMySQLiDB object and connects to the database backend.
Connect to master server
Definition at line 47 of file ezmysqlidb.php.
| eZMySQLiDB::eZTableList | ( | $ | server = eZDBInterface::SERVER_MASTER | ) | [virtual] |
Implements eZDBInterface.
Definition at line 633 of file ezmysqlidb.php.
| eZMySQLiDB::isCharsetSupported | ( | $ | charset | ) |
true if the charset $charset is supported by the connected database. Reimplemented from eZDBInterface.
Definition at line 861 of file ezmysqlidb.php.
Referenced by connect().
| eZMySQLiDB::lastSerialID | ( | $ | table = false, |
| $ | column = false |
||
| ) | [virtual] |
Returns the last serial ID generated with an auto increment field.
Implements eZDBInterface.
Definition at line 742 of file ezmysqlidb.php.
| eZMySQLiDB::lock | ( | $ | table | ) | [virtual] |
| eZMySQLiDB::md5 | ( | $ | str | ) | [virtual] |
Implements eZDBInterface.
Definition at line 563 of file ezmysqlidb.php.
| eZMySQLiDB::query | ( | $ | sql, |
| $ | server = false |
||
| ) | [virtual] |
Execute a query on the global MySQL database link. If it returns an error, the script is halted and the attempted SQL query and MySQL error message are printed.
| $sql | SQL query to execute. |
Implements eZDBInterface.
Definition at line 298 of file ezmysqlidb.php.
Referenced by arrayQuery(), beginQuery(), commitQuery(), createDatabase(), lock(), removeDatabase(), removeRelation(), rollbackQuery(), and unlock().
| eZMySQLiDB::relationCount | ( | $ | relationType = eZDBInterface::RELATION_TABLE | ) | [virtual] |
Implements eZDBInterface.
Definition at line 596 of file ezmysqlidb.php.
Referenced by relationCounts().
| eZMySQLiDB::relationCounts | ( | $ | relationMask | ) | [virtual] |
Implements eZDBInterface.
Definition at line 588 of file ezmysqlidb.php.
| eZMySQLiDB::relationList | ( | $ | relationType = eZDBInterface::RELATION_TABLE | ) | [virtual] |
Implements eZDBInterface.
Definition at line 613 of file ezmysqlidb.php.
| eZMySQLiDB::relationMatchRegexp | ( | $ | relationType | ) | [virtual] |
false. | $relationType | The type which needs to be filtered, this allows one regexp per type. |
An example, will only match tables that start with 'ez'.
return "#^ez#";
Implements eZDBInterface.
Definition at line 663 of file ezmysqlidb.php.
| eZMySQLiDB::removeDatabase | ( | $ | dbName | ) | [virtual] |
| eZMySQLiDB::removeRelation | ( | $ | relationName, |
| $ | relationType | ||
| ) | [virtual] |
Tries to remove the relation type $relationType named $relationName
true if successful Implements eZDBInterface.
Definition at line 668 of file ezmysqlidb.php.
| eZMySQLiDB::rollbackQuery | ( | ) |
The query to cancel the transaction.
Reimplemented from eZDBInterface.
Definition at line 737 of file ezmysqlidb.php.
| eZMySQLiDB::setError | ( | ) | [virtual] |
Sets the error message and error message number
Implements eZDBInterface.
Definition at line 793 of file ezmysqlidb.php.
Referenced by checkCharsetPriv(), connect(), createDatabase(), query(), and removeDatabase().
| eZMySQLiDB::subString | ( | $ | string, |
| $ | from, | ||
| $ | len = null |
||
| ) | [virtual] |
Implements eZDBInterface.
Definition at line 546 of file ezmysqlidb.php.
| eZMySQLiDB::supportedRelationTypeMask | ( | ) | [virtual] |
Implements eZDBInterface.
Definition at line 578 of file ezmysqlidb.php.
| eZMySQLiDB::supportedRelationTypes | ( | ) | [virtual] |
Implements eZDBInterface.
Definition at line 583 of file ezmysqlidb.php.
| eZMySQLiDB::supportsDefaultValuesInsertion | ( | ) |
Reimplemented from eZDBInterface.
Definition at line 866 of file ezmysqlidb.php.
| eZMySQLiDB::unlock | ( | ) | [virtual] |
| eZMySQLiDB::$CharsetMapping |
Definition at line 877 of file ezmysqlidb.php.
eZMySQLiDB::$TempTableList [protected] |
Definition at line 878 of file ezmysqlidb.php.