|
eZ Publish
[4.0]
|
The eZDBInterface defines the interface for all database implementations. More...
Inheritance diagram for eZDBInterface:Public Member Functions | |
| arrayQuery ($sql, $params=array(), $server=false) | |
| attribute ($name) | |
| attributes () | |
| availableDatabases () | |
| begin () | |
| beginQuery () | |
| bindingType () | |
| bindVariable ($value, $fieldDef=false) | |
| bitAnd ($arg1, $arg2) | |
| bitOr ($arg1, $arg2) | |
| charset () | |
| checkCharset ($charset, &$currentCharset) | |
| close () | |
| commit () | |
| commitQuery () | |
| concatString ($strings=array()) | |
| connectRetryCount () | |
| connectRetryWaitTime () | |
| createDatabase ($dbName) | |
| createTempTable ($createTableQuery= '', $server=self::SERVER_SLAVE) | |
| databaseClientVersion () | |
| databaseName () | |
| databaseServerVersion () | |
| dropTempTable ($dropTableQuery= '', $server=self::SERVER_SLAVE) | |
| dropTempTableList ($tableList, $server=self::SERVER_SLAVE) | |
| errorMessage () | |
| errorNumber () | |
| escapeString ($str) | |
| eZDBInterface ($parameters) | |
| eZTableList ($server=self::SERVER_MASTER) | |
| generateFailedTransactionStack () | |
| generateUniqueTempTableName ($pattern, $randomizeIndex=false, $server=self::SERVER_SLAVE) | |
| hasAttribute ($name) | |
| hasRequiredServerVersion ($minVersion, $name=false) | |
| implodeWithTypeCast ($glue, &$pieces, $type) | |
| insertFile ($path, $sqlFile, $usePathType=true) | |
| invalidateTransaction () | |
| isCharsetSupported ($charset) | |
| isTransactionValid () | |
| 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) | |
| removeRelation ($relationName, $relationType) | |
| rollback () | |
| rollbackQuery () | |
| setError () | |
| setIsSQLOutputEnabled ($enabled) | |
| socketPath () | |
| subString ($string, $from, $len=null) | |
| supportedRelationTypeMask () | |
| supportedRelationTypes () | |
| supportsDefaultValuesInsertion () | |
| transactionCounter () | |
| unlock () | |
| usesBuiltinEncoding () | |
| useShortNames () | |
| version () | |
Static Public Member Functions | |
| generateSQLINStatement ($elements, $columnName= '', $not=false, $unique=true, $type=false) | |
Public Attributes | |
| $Charset | |
| The charset used for the current database. | |
| $ConnectRetries | |
| The number of times to retry a connection if it fails. | |
| $DB | |
| The current database name. | |
| $DBConnection | |
The current connection, false if not connection has been made. | |
| $DBWriteConnection | |
| Contains the write database connection if used. | |
| $EndTime | |
| The end time of the tiemr. | |
| $ErrorMessage | |
| The database error message of the last executed function. | |
| $ErrorNumber = 0 | |
| The database error message number of the last executed function. | |
| $InputTextCodec | |
| $IsConnected = false | |
| Contains true if we're connected to the database backend. | |
| $NumQueries = 0 | |
| Contains number of queries sended to DB. | |
| $OutputSQL | |
| Setting if SQL queries should be sent to debug output. | |
| $OutputTextCodec | |
| Instance of a textcodec which handles text conversion, may not be set if no builtin encoding is used. | |
| $Password | |
| Stores the database connection password. | |
| $Port | |
| Contains the current port. | |
| $RecordError = true | |
| If true then ErrorMessage and ErrorNumber get filled. | |
| $Server | |
| Contains the current server. | |
| $SlaveDB | |
| The slave database name. | |
| $SlavePassword | |
| The slave database user password. | |
| $SlavePort | |
| The slave server port. | |
| $SlaveServer | |
| The slave server name. | |
| $SlaveUser | |
| The slave database user. | |
| $SocketPath | |
| The socket path, used by MySQL. | |
| $StartTime | |
| The start time of the timer. | |
| $TimeTaken | |
| The total number of milliseconds the timer took. | |
| $TransactionCounter | |
| The transaction counter, 0 means no transaction. | |
| $TransactionIsValid | |
| Flag which tells if a transaction is considered valid or not A transaction will be made invalid if SQL errors occur. | |
| $UseBuiltinEncoding | |
| True if a builtin encoder is to be used, this means that all input/output text is converted. | |
| $UsePersistentConnection = false | |
| If true then the database connection should be persistent. | |
| $User | |
| Stores the database connection user. | |
| $UserSlaveServer | |
| Contains true if slave servers are enabled. | |
| const | BINDING_NAME = 1 |
| const | BINDING_NO = 0 |
| const | BINDING_ORDERED = 2 |
| const | ERROR_MISSING_EXTENSION = 1 |
| const | RELATION_INDEX = 4 |
| const | RELATION_INDEX_BIT = 16 |
| const | RELATION_MASK = 31 |
| const | RELATION_NONE = 0 |
| const | RELATION_SEQUENCE = 1 |
| const | RELATION_SEQUENCE_BIT = 2 |
| const | RELATION_TABLE = 0 |
| const | RELATION_TABLE_BIT = 1 |
| const | RELATION_TRIGGER = 2 |
| const | RELATION_TRIGGER_BIT = 4 |
| const | RELATION_VIEW = 3 |
| const | RELATION_VIEW_BIT = 8 |
| const | SERVER_MASTER = 1 |
| const | SERVER_SLAVE = 2 |
Protected Member Functions | |
| isConnected () | |
| relationName ($relationType) | |
| reportError () | |
Private Member Functions | |
| endTime () | |
| endTimer () | |
| generateFailedTransactionStackEntry ($stack, $indentCount) | |
| generateTraceEntry ($entry) | |
| prepareSqlQuery (&$fd, &$buffer) | |
| reportQuery ($class, $sql, $numRows, $timeTaken) | |
| startTime () | |
| startTimer () | |
| timeTaken () | |
The eZDBInterface defines the interface for all database implementations.
Definition at line 44 of file ezdbinterface.php.
| eZDBInterface::arrayQuery | ( | $ | sql, |
| $ | params = array(), |
||
| $ | server = false |
||
| ) | [pure 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 ) );
Implemented in eZMySQLDB, eZMySQLiDB, eZPostgreSQLDB, and eZNullDB.
Definition at line 631 of file ezdbinterface.php.
| eZDBInterface::attribute | ( | $ | name | ) |
null. Definition at line 218 of file ezdbinterface.php.
| eZDBInterface::attributes | ( | ) |
Definition at line 198 of file ezdbinterface.php.
| eZDBInterface::availableDatabases | ( | ) |
Return alvailable databases in database.
Reimplemented in eZMySQLDB, and eZMySQLiDB.
Definition at line 1267 of file ezdbinterface.php.
| eZDBInterface::begin | ( | ) |
Begin a new transaction. If we are already in transaction then we omit this new transaction and its matching commit or rollback.
Reimplemented in eZNullDB.
Definition at line 655 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\lock().
| eZDBInterface::beginQuery | ( | ) |
The query to start a transaction. This function must be reimplemented in the subclasses.
Reimplemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 713 of file ezdbinterface.php.
Referenced by begin().
| eZDBInterface::bindingType | ( | ) | [pure virtual] |
Returns type of binding used in database plugin.
Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 592 of file ezdbinterface.php.
| eZDBInterface::bindVariable | ( | $ | value, |
| $ | fieldDef = false |
||
| ) | [pure virtual] |
Binds variable.
Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 600 of file ezdbinterface.php.
| eZDBInterface::bitAnd | ( | $ | arg1, |
| $ | arg2 | ||
| ) | [pure virtual] |
Implemented in eZMySQLDB, and eZMySQLiDB.
Definition at line 512 of file ezdbinterface.php.
| eZDBInterface::bitOr | ( | $ | arg1, |
| $ | arg2 | ||
| ) | [pure virtual] |
Implemented in eZMySQLDB, and eZMySQLiDB.
Definition at line 521 of file ezdbinterface.php.
| eZDBInterface::charset | ( | ) |
Returns the charset which the database is encoded in.
Definition at line 573 of file ezdbinterface.php.
| eZDBInterface::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. |
true, see the specific database handler for more information. Reimplemented in eZMySQLDB, and eZMySQLiDB.
Definition at line 243 of file ezdbinterface.php.
| eZDBInterface::close | ( | ) | [pure virtual] |
Will close the database connection.
Implemented in eZMySQLDB, eZMySQLiDB, eZPostgreSQLDB, and eZNullDB.
Definition at line 1190 of file ezdbinterface.php.
| eZDBInterface::commit | ( | ) |
Commits the current transaction. If this is not the outermost it will not commit to the database immediately but instead decrease the transaction counter.
If the current transaction had any errors in it the transaction will be rollbacked instead of commited. This ensures that the database is in a valid state. Also the PHP execution will be stopped.
true if the transaction was successful, false otherwise. Reimplemented in eZNullDB.
Definition at line 728 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\unlock().
| eZDBInterface::commitQuery | ( | ) |
The query to commit the transaction. This function must be reimplemented in the subclasses.
Reimplemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 795 of file ezdbinterface.php.
Referenced by commit().
| eZDBInterface::concatString | ( | $ | strings = array() | ) | [pure virtual] |
Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 494 of file ezdbinterface.php.
| eZDBInterface::connectRetryCount | ( | ) |
Definition at line 440 of file ezdbinterface.php.
Referenced by eZMySQLDB\connect(), eZMySQLiDB\connect(), and eZPostgreSQLDB\eZPostgreSQLDB().
| eZDBInterface::connectRetryWaitTime | ( | ) |
Definition at line 449 of file ezdbinterface.php.
Referenced by eZMySQLDB\connect(), eZMySQLiDB\connect(), and eZPostgreSQLDB\eZPostgreSQLDB().
| eZDBInterface::createDatabase | ( | $ | dbName | ) | [pure virtual] |
Create a new database
Implemented in eZMySQLDB, and eZMySQLiDB.
Definition at line 1207 of file ezdbinterface.php.
| eZDBInterface::createTempTable | ( | $ | createTableQuery = '', |
| $ | server = self::SERVER_SLAVE |
||
| ) |
Create a new temporary table
Definition at line 1214 of file ezdbinterface.php.
| eZDBInterface::databaseClientVersion | ( | ) | [pure virtual] |
false if no version could be retrieved/ Implemented in eZMySQLDB, and eZMySQLiDB.
Definition at line 557 of file ezdbinterface.php.
| eZDBInterface::databaseName | ( | ) | [pure 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'.
Implemented in eZMySQLDB, eZMySQLiDB, eZPostgreSQLDB, and eZNullDB.
Definition at line 424 of file ezdbinterface.php.
Referenced by hasRequiredServerVersion(), and insertFile().
| eZDBInterface::databaseServerVersion | ( | ) |
false if no version could be retrieved/ Reimplemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 549 of file ezdbinterface.php.
Referenced by hasRequiredServerVersion().
| eZDBInterface::dropTempTable | ( | $ | dropTableQuery = '', |
| $ | server = self::SERVER_SLAVE |
||
| ) |
Drop temporary table
Definition at line 1222 of file ezdbinterface.php.
Referenced by dropTempTableList().
| eZDBInterface::dropTempTableList | ( | $ | tableList, |
| $ | server = self::SERVER_SLAVE |
||
| ) |
Drop temporary table list
Definition at line 1230 of file ezdbinterface.php.
| eZDBInterface::endTime | ( | ) | [private] |
Definition at line 405 of file ezdbinterface.php.
| eZDBInterface::endTimer | ( | ) | [private] |
Stops the current timer and calculates the time taken.
Definition at line 384 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\query(), eZMySQLiDB\query(), and eZMySQLDB\query().
| eZDBInterface::errorMessage | ( | ) |
Returns the error message
Definition at line 1247 of file ezdbinterface.php.
| eZDBInterface::errorNumber | ( | ) |
Returns the error number
Definition at line 1255 of file ezdbinterface.php.
Referenced by eZMySQLiDB\availableDatabases(), eZMySQLDB\availableDatabases(), and insertFile().
| eZDBInterface::escapeString | ( | $ | str | ) | [pure virtual] |
Will escape a string so it's ready to be inserted in the database.
Implemented in eZMySQLDB, eZMySQLiDB, eZPostgreSQLDB, and eZNullDB.
Definition at line 1181 of file ezdbinterface.php.
| eZDBInterface::eZDBInterface | ( | $ | parameters | ) |
Create a new eZDBInterface object and connects to the database backend.
Definition at line 73 of file ezdbinterface.php.
Referenced by eZMySQLDB\eZMySQLDB(), eZMySQLiDB\eZMySQLiDB(), eZNullDB\eZNullDB(), and eZPostgreSQLDB\eZPostgreSQLDB().
| eZDBInterface::eZTableList | ( | $ | server = self::SERVER_MASTER | ) | [pure virtual] |
Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 1083 of file ezdbinterface.php.
Referenced by generateUniqueTempTableName().
| eZDBInterface::generateFailedTransactionStack | ( | ) |
Goes through the transaction stack tree $this->TransactionStackTree and generates the text output for it and returns it.
Definition at line 837 of file ezdbinterface.php.
| eZDBInterface::generateFailedTransactionStackEntry | ( | $ | stack, |
| $ | indentCount | ||
| ) | [private] |
Recursive helper function for generating stack tree output.
Definition at line 851 of file ezdbinterface.php.
Referenced by generateFailedTransactionStack().
| eZDBInterface::generateSQLINStatement | ( | $ | elements, |
| $ | columnName = '', |
||
| $ | not = false, |
||
| $ | unique = true, |
||
| $ | type = false |
||
| ) | [static] |
This function can be used to create a SQL IN statement to be used in a WHERE clause:
WHERE columnName IN ( element1, element2, ... )
By default, the elements that can be submitted as an anonymous array (or an integer value in case of a single element) will just be imploded. Drivers for databases with a limitation of the elements within an IN statement have to reimplement this function. It is also possible to negate the "IN" to a "NOT IN" by using the last parameter of this function.
Usage:
$db =& eZDb::instance(); $db->generateSQLINStatement( array( 2, 5, 43, ) );
| $elements | Elements that should (not) be matched by the IN statment as an integer or anonymous array |
| $columnName | Column name of the database table the IN statement should be created for |
| $not | Will generate a "NOT IN" ( if set to true ) statement instead of an "IN" ( if set to false , default ) |
| $unique | |
| $type | The type to cast the array elements to |
Definition at line 1331 of file ezdbinterface.php.
| eZDBInterface::generateTraceEntry | ( | $ | entry | ) | [private] |
Helper function for generating output for one stack-trace entry.
Definition at line 898 of file ezdbinterface.php.
Referenced by generateFailedTransactionStackEntry().
| eZDBInterface::generateUniqueTempTableName | ( | $ | pattern, |
| $ | randomizeIndex = false, |
||
| $ | server = self::SERVER_SLAVE |
||
| ) |
Generate unique table name basing on the given pattern. If the pattern contains a (%) character then the character is replaced with a part providing uniqueness (e.g. random number).
Definition at line 1277 of file ezdbinterface.php.
| eZDBInterface::hasAttribute | ( | $ | name | ) |
true if the attribute $name exists for this database handler. Definition at line 206 of file ezdbinterface.php.
| eZDBInterface::hasRequiredServerVersion | ( | $ | minVersion, |
| $ | name = false |
||
| ) |
Checks if the version number of the server is equal or larger than $minVersion. Will also check if the database type is correct if $name is set.
| $minVersion | A string denoting the min. required version. |
| $name | The name of the database type it requires or false if it does not matter. |
true if the server fulfills the requirements. Definition at line 534 of file ezdbinterface.php.
| eZDBInterface::implodeWithTypeCast | ( | $ | glue, |
| &$ | pieces, | ||
| $ | type | ||
| ) |
Casts elements of $pieces to type $type and returns them as string separated by $glue.
| $glue | The separator. $pieces The array containing the elements. $type The type to cast to. |
Example:
implodeWithTypeCast( ',', $myArray, 'int' )
Definition at line 1154 of file ezdbinterface.php.
Referenced by generateSQLINStatement().
| eZDBInterface::insertFile | ( | $ | path, |
| $ | sqlFile, | ||
| $ | usePathType = true |
||
| ) |
Inserts the SQL file $sqlFile found in the path $path into the currently connected database.
true if succesful. Definition at line 303 of file ezdbinterface.php.
| eZDBInterface::invalidateTransaction | ( | ) |
Invalidates the current transaction, see commit() for more details on this.
true if it was invalidated or false if there is no transaction to invalidate.Definition at line 954 of file ezdbinterface.php.
Referenced by reportError().
| eZDBInterface::isCharsetSupported | ( | $ | charset | ) |
true if the charset $charset is supported by the connected database. Reimplemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 564 of file ezdbinterface.php.
| eZDBInterface::isConnected | ( | ) | [protected] |
Returns true if we're connected to the database backend.
Definition at line 1198 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\arrayQuery(), begin(), commit(), eZPostgreSQLDB\correctSequenceValues(), eZPostgreSQLDB\databaseServerVersion(), eZPostgreSQLDB\eZTableList(), eZPostgreSQLDB\lastSerialID(), eZPostgreSQLDB\lock(), eZPostgreSQLDB\query(), eZPostgreSQLDB\relationCount(), eZPostgreSQLDB\relationCounts(), eZPostgreSQLDB\relationList(), eZPostgreSQLDB\removeRelation(), and rollback().
| eZDBInterface::isTransactionValid | ( | ) |
true if the current or last running transaction was valid, false otherwise. Definition at line 1047 of file ezdbinterface.php.
| eZDBInterface::lastSerialID | ( | $ | table = false, |
| $ | column = false |
||
| ) | [pure virtual] |
Returns the last serial ID generated with an auto increment field.
Implemented in eZMySQLDB, eZMySQLiDB, eZPostgreSQLDB, and eZNullDB.
Definition at line 1173 of file ezdbinterface.php.
| eZDBInterface::lock | ( | $ | table | ) | [pure virtual] |
Locks a table
Implemented in eZMySQLDB, eZMySQLiDB, eZPostgreSQLDB, and eZNullDB.
Definition at line 639 of file ezdbinterface.php.
| eZDBInterface::md5 | ( | $ | str | ) | [pure virtual] |
Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 503 of file ezdbinterface.php.
Referenced by reportError().
| eZDBInterface::prepareSqlQuery | ( | &$ | fd, |
| &$ | buffer | ||
| ) | [private] |
Prepare the sql file so we can create the database.
| $fd | The file descriptor |
| $buffer | Reference to string buffer for SQL queries. |
Definition at line 254 of file ezdbinterface.php.
Referenced by insertFile().
| eZDBInterface::query | ( | $ | sql, |
| $ | server = false |
||
| ) | [pure 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. |
Implemented in eZMySQLDB, eZMySQLiDB, eZPostgreSQLDB, and eZNullDB.
Definition at line 611 of file ezdbinterface.php.
Referenced by createTempTable(), dropTempTable(), and insertFile().
| eZDBInterface::relationCount | ( | $ | relationType = eZDBInterface::RELATION_TABLE | ) | [pure virtual] |
Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 1075 of file ezdbinterface.php.
| eZDBInterface::relationCounts | ( | $ | relationMask | ) | [pure virtual] |
Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 1067 of file ezdbinterface.php.
| eZDBInterface::relationList | ( | $ | relationType = eZDBInterface::RELATION_TABLE | ) | [pure virtual] |
Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 1091 of file ezdbinterface.php.
| eZDBInterface::relationMatchRegexp | ( | $ | relationType | ) | [pure 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#";
Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 1136 of file ezdbinterface.php.
| eZDBInterface::relationName | ( | $ | relationType | ) | [protected] |
Definition at line 1110 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\removeRelation(), eZMySQLiDB\removeRelation(), and eZMySQLDB\removeRelation().
| eZDBInterface::removeRelation | ( | $ | relationName, |
| $ | relationType | ||
| ) | [pure virtual] |
Tries to remove the relation type $relationType named $relationName
true if successful Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 1100 of file ezdbinterface.php.
| eZDBInterface::reportError | ( | ) | [protected] |
This is called whenever an error occurs in one of the database handlers. If a transaction is active it will be invalidated as well.
Definition at line 967 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\query(), eZMySQLiDB\query(), and eZMySQLDB\query().
| eZDBInterface::reportQuery | ( | $ | class, |
| $ | sql, | ||
| $ | numRows, | ||
| $ | timeTaken | ||
| ) | [private] |
Writes a debug notice with query information.
Definition at line 352 of file ezdbinterface.php.
Referenced by eZMySQLiDB\arrayQuery(), eZMySQLDB\arrayQuery(), eZMySQLiDB\checkCharsetPriv(), eZMySQLDB\checkCharsetPriv(), eZMySQLDB\connect(), eZMySQLDB\eZTableList(), eZPostgreSQLDB\query(), eZMySQLiDB\query(), eZMySQLDB\query(), eZMySQLDB\relationCount(), and eZMySQLDB\relationList().
| eZDBInterface::rollback | ( | ) |
Cancels the transaction.
Reimplemented in eZNullDB.
Definition at line 803 of file ezdbinterface.php.
| eZDBInterface::rollbackQuery | ( | ) |
The query to cancel the transaction. This function must be reimplemented in the subclasses.
Reimplemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 943 of file ezdbinterface.php.
Referenced by commit(), reportError(), and rollback().
| eZDBInterface::setError | ( | ) | [pure virtual] |
Sets the error message and error message number
Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 1240 of file ezdbinterface.php.
| eZDBInterface::setIsSQLOutputEnabled | ( | $ | enabled | ) |
Enabled or disables sql output.
Definition at line 364 of file ezdbinterface.php.
| eZDBInterface::socketPath | ( | ) |
false if no socket path was defined. Definition at line 432 of file ezdbinterface.php.
| eZDBInterface::startTime | ( | ) | [private] |
Definition at line 396 of file ezdbinterface.php.
| eZDBInterface::startTimer | ( | ) | [private] |
Records the current micro time. End the timer with endTimer() and fetch the result with timeTaken();
Definition at line 374 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\query(), eZMySQLiDB\query(), and eZMySQLDB\query().
| eZDBInterface::subString | ( | $ | string, |
| $ | from, | ||
| $ | len = null |
||
| ) | [pure virtual] |
Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 485 of file ezdbinterface.php.
| eZDBInterface::supportedRelationTypeMask | ( | ) | [pure virtual] |
Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 458 of file ezdbinterface.php.
| eZDBInterface::supportedRelationTypes | ( | ) | [pure virtual] |
Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 476 of file ezdbinterface.php.
| eZDBInterface::supportsDefaultValuesInsertion | ( | ) |
Reimplemented in eZMySQLDB, and eZMySQLiDB.
Definition at line 1351 of file ezdbinterface.php.
| eZDBInterface::timeTaken | ( | ) | [private] |
Definition at line 414 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\query(), eZMySQLiDB\query(), and eZMySQLDB\query().
| eZDBInterface::transactionCounter | ( | ) |
0 means no transactions, 1 or higher means 1 or more transactions are running and a negative value means something is wrong.
Definition at line 1058 of file ezdbinterface.php.
| eZDBInterface::unlock | ( | ) | [pure virtual] |
Releases table locks.
Implemented in eZMySQLDB, eZMySQLiDB, eZPostgreSQLDB, and eZNullDB.
Definition at line 647 of file ezdbinterface.php.
| eZDBInterface::usesBuiltinEncoding | ( | ) |
Returns true if the database handles encoding itself, if not all queries and returned data must be decoded yourselves.
Definition at line 583 of file ezdbinterface.php.
| eZDBInterface::useShortNames | ( | ) | [pure virtual] |
Definition at line 467 of file ezdbinterface.php.
| eZDBInterface::version | ( | ) |
Get database version number
Definition at line 1299 of file ezdbinterface.php.
| eZDBInterface::$Charset |
The charset used for the current database.
Definition at line 1374 of file ezdbinterface.php.
| eZDBInterface::$ConnectRetries |
The number of times to retry a connection if it fails.
Definition at line 1376 of file ezdbinterface.php.
| eZDBInterface::$DB |
The current database name.
Definition at line 1364 of file ezdbinterface.php.
| eZDBInterface::$DBConnection |
The current connection, false if not connection has been made.
Definition at line 1366 of file ezdbinterface.php.
| eZDBInterface::$DBWriteConnection |
Contains the write database connection if used.
Definition at line 1368 of file ezdbinterface.php.
| eZDBInterface::$EndTime |
The end time of the tiemr.
Definition at line 1392 of file ezdbinterface.php.
| eZDBInterface::$ErrorMessage |
The database error message of the last executed function.
Definition at line 1396 of file ezdbinterface.php.
| eZDBInterface::$ErrorNumber = 0 |
The database error message number of the last executed function.
Definition at line 1398 of file ezdbinterface.php.
| eZDBInterface::$InputTextCodec |
Definition at line 1379 of file ezdbinterface.php.
| eZDBInterface::$IsConnected = false |
Contains true if we're connected to the database backend.
Definition at line 1386 of file ezdbinterface.php.
| eZDBInterface::$NumQueries = 0 |
Contains number of queries sended to DB.
Definition at line 1388 of file ezdbinterface.php.
| eZDBInterface::$OutputSQL |
Setting if SQL queries should be sent to debug output.
Definition at line 1384 of file ezdbinterface.php.
| eZDBInterface::$OutputTextCodec |
Instance of a textcodec which handles text conversion, may not be set if no builtin encoding is used.
Definition at line 1378 of file ezdbinterface.php.
| eZDBInterface::$Password |
Stores the database connection password.
Definition at line 1372 of file ezdbinterface.php.
| eZDBInterface::$Port |
Contains the current port.
Definition at line 1360 of file ezdbinterface.php.
| eZDBInterface::$RecordError = true |
If true then ErrorMessage and ErrorNumber get filled.
Definition at line 1400 of file ezdbinterface.php.
| eZDBInterface::$Server |
Contains the current server.
Definition at line 1358 of file ezdbinterface.php.
| eZDBInterface::$SlaveDB |
The slave database name.
Definition at line 1406 of file ezdbinterface.php.
| eZDBInterface::$SlavePassword |
The slave database user password.
Definition at line 1414 of file ezdbinterface.php.
| eZDBInterface::$SlavePort |
The slave server port.
Definition at line 1410 of file ezdbinterface.php.
| eZDBInterface::$SlaveServer |
The slave server name.
Definition at line 1408 of file ezdbinterface.php.
| eZDBInterface::$SlaveUser |
The slave database user.
Definition at line 1412 of file ezdbinterface.php.
| eZDBInterface::$SocketPath |
The socket path, used by MySQL.
Definition at line 1362 of file ezdbinterface.php.
| eZDBInterface::$StartTime |
The start time of the timer.
Definition at line 1390 of file ezdbinterface.php.
| eZDBInterface::$TimeTaken |
The total number of milliseconds the timer took.
Definition at line 1394 of file ezdbinterface.php.
| eZDBInterface::$TransactionCounter |
The transaction counter, 0 means no transaction.
Definition at line 1416 of file ezdbinterface.php.
| eZDBInterface::$TransactionIsValid |
Flag which tells if a transaction is considered valid or not A transaction will be made invalid if SQL errors occur.
Definition at line 1419 of file ezdbinterface.php.
| eZDBInterface::$UseBuiltinEncoding |
True if a builtin encoder is to be used, this means that all input/output text is converted.
Definition at line 1382 of file ezdbinterface.php.
| eZDBInterface::$UsePersistentConnection = false |
If true then the database connection should be persistent.
Definition at line 1402 of file ezdbinterface.php.
| eZDBInterface::$User |
Stores the database connection user.
Definition at line 1370 of file ezdbinterface.php.
| eZDBInterface::$UserSlaveServer |
Contains true if slave servers are enabled.
Definition at line 1404 of file ezdbinterface.php.
| const eZDBInterface::BINDING_NAME = 1 |
Definition at line 47 of file ezdbinterface.php.
| const eZDBInterface::BINDING_NO = 0 |
Definition at line 46 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\bindingType(), eZMySQLiDB\bindingType(), eZMySQLDB\bindingType(), eZSessionWrite(), eZPersistentObject\storeObject(), and eZPersistentObject\updateObjectList().
| const eZDBInterface::BINDING_ORDERED = 2 |
Definition at line 48 of file ezdbinterface.php.
| const eZDBInterface::ERROR_MISSING_EXTENSION = 1 |
Definition at line 65 of file ezdbinterface.php.
Referenced by eZMySQLDB\eZMySQLDB(), eZMySQLiDB\eZMySQLiDB(), and eZPostgreSQLDB\eZPostgreSQLDB().
| const eZDBInterface::RELATION_INDEX = 4 |
Definition at line 54 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\relationKind(), relationName(), and eZPostgreSQLDB\supportedRelationTypes().
| const eZDBInterface::RELATION_INDEX_BIT = 16 |
Definition at line 60 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\supportedRelationTypeMask().
| const eZDBInterface::RELATION_MASK = 31 |
Definition at line 63 of file ezdbinterface.php.
| const eZDBInterface::RELATION_NONE = 0 |
Definition at line 62 of file ezdbinterface.php.
Referenced by supportedRelationTypeMask().
| const eZDBInterface::RELATION_SEQUENCE = 1 |
Definition at line 51 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\eZTableList(), eZPostgreSQLDB\relationKind(), relationName(), and eZPostgreSQLDB\supportedRelationTypes().
| const eZDBInterface::RELATION_SEQUENCE_BIT = 2 |
Definition at line 57 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\supportedRelationTypeMask().
| const eZDBInterface::RELATION_TABLE = 0 |
Definition at line 50 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\eZTableList(), eZMySQLiDB\eZTableList(), eZMySQLDB\eZTableList(), eZMySQLiDB\relationCount(), eZMySQLDB\relationCount(), eZPostgreSQLDB\relationKind(), eZMySQLiDB\relationList(), eZMySQLDB\relationList(), relationName(), eZPostgreSQLDB\supportedRelationTypes(), eZMySQLiDB\supportedRelationTypes(), and eZMySQLDB\supportedRelationTypes().
| const eZDBInterface::RELATION_TABLE_BIT = 1 |
Definition at line 56 of file ezdbinterface.php.
Referenced by eZMySQLiDB\relationCounts(), eZMySQLDB\relationCounts(), eZPostgreSQLDB\supportedRelationTypeMask(), eZMySQLiDB\supportedRelationTypeMask(), and eZMySQLDB\supportedRelationTypeMask().
| const eZDBInterface::RELATION_TRIGGER = 2 |
Definition at line 52 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\relationKind(), relationName(), and eZPostgreSQLDB\supportedRelationTypes().
| const eZDBInterface::RELATION_TRIGGER_BIT = 4 |
Definition at line 58 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\supportedRelationTypeMask().
| const eZDBInterface::RELATION_VIEW = 3 |
Definition at line 53 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\relationKind(), relationName(), and eZPostgreSQLDB\supportedRelationTypes().
| const eZDBInterface::RELATION_VIEW_BIT = 8 |
Definition at line 59 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\supportedRelationTypeMask().
| const eZDBInterface::SERVER_MASTER = 1 |
Definition at line 67 of file ezdbinterface.php.
Referenced by eZMySQLiDB\query(), and eZMySQLDB\query().
| const eZDBInterface::SERVER_SLAVE = 2 |
Definition at line 68 of file ezdbinterface.php.
Referenced by eZContentObjectTreeNode\calendar(), eZContentObjectTreeNode\createPermissionCheckingSQL(), eZMySQLiDB\eZTableList(), eZMySQLDB\eZTableList(), eZMySQLiDB\query(), eZMySQLDB\query(), eZContentObjectTreeNode\subTreeByNodeID(), eZContentObjectTreeNode\subTreeCountByNodeID(), eZContentObjectTreeNode\subTreeMultiPaths(), and eZContentObjectTreeNode\subtreeSoleNodeCount().