|
eZ Publish
[4.2]
|
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 () | |
| generateSQLINStatement ($elements, $columnName= '', $not=false, $unique=true, $type=false) | |
| This function can be used to create a SQL IN statement to be used in a WHERE clause: | |
| 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) | |
| removeDatabase ($dbName) | |
| removeRelation ($relationName, $relationType) | |
| rollback () | |
| rollbackQuery () | |
| setError () | |
| setIsSQLOutputEnabled ($enabled) | |
| socketPath () | |
| subString ($string, $from, $len=null) | |
| supportedRelationTypeMask () | |
| supportedRelationTypes () | |
| supportsDefaultValuesInsertion () | |
| transactionCounter () | |
| unlock () | |
| usesBuiltinEncoding () | |
| useShortNames () | |
| version () | |
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, $asDebug=false) | |
| startTime () | |
| startTimer () | |
| timeTaken () | |
The eZDBInterface defines the interface for all database implementations.
Definition at line 41 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 629 of file ezdbinterface.php.
| eZDBInterface::attribute | ( | $ | name | ) |
null. Definition at line 214 of file ezdbinterface.php.
| eZDBInterface::attributes | ( | ) |
Definition at line 194 of file ezdbinterface.php.
| eZDBInterface::availableDatabases | ( | ) |
Return alvailable databases in database.
Reimplemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 1270 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 653 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 711 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 590 of file ezdbinterface.php.
| eZDBInterface::bindVariable | ( | $ | value, |
| $ | fieldDef = false |
||
| ) | [pure virtual] |
Binds variable.
Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 598 of file ezdbinterface.php.
| eZDBInterface::bitAnd | ( | $ | arg1, |
| $ | arg2 | ||
| ) | [pure virtual] |
Implemented in eZMySQLDB, and eZMySQLiDB.
Definition at line 510 of file ezdbinterface.php.
| eZDBInterface::bitOr | ( | $ | arg1, |
| $ | arg2 | ||
| ) | [pure virtual] |
Implemented in eZMySQLDB, and eZMySQLiDB.
Definition at line 519 of file ezdbinterface.php.
| eZDBInterface::charset | ( | ) |
Returns the charset which the database is encoded in.
Definition at line 571 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 239 of file ezdbinterface.php.
| eZDBInterface::close | ( | ) | [pure virtual] |
Will close the database connection.
Implemented in eZMySQLDB, eZMySQLiDB, eZPostgreSQLDB, and eZNullDB.
Definition at line 1185 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 726 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 793 of file ezdbinterface.php.
Referenced by commit().
| eZDBInterface::concatString | ( | $ | strings = array() | ) | [pure virtual] |
Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 492 of file ezdbinterface.php.
| eZDBInterface::connectRetryCount | ( | ) |
Definition at line 438 of file ezdbinterface.php.
Referenced by eZMySQLDB\connect(), eZMySQLiDB\connect(), and eZPostgreSQLDB\eZPostgreSQLDB().
| eZDBInterface::connectRetryWaitTime | ( | ) |
Definition at line 447 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, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 1202 of file ezdbinterface.php.
| eZDBInterface::createTempTable | ( | $ | createTableQuery = '', |
| $ | server = self::SERVER_SLAVE |
||
| ) |
Create a new temporary table
Definition at line 1217 of file ezdbinterface.php.
| eZDBInterface::databaseClientVersion | ( | ) | [pure virtual] |
false if no version could be retrieved/ Implemented in eZMySQLDB, and eZMySQLiDB.
Definition at line 555 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 422 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 547 of file ezdbinterface.php.
Referenced by hasRequiredServerVersion().
| eZDBInterface::dropTempTable | ( | $ | dropTableQuery = '', |
| $ | server = self::SERVER_SLAVE |
||
| ) |
Drop temporary table
Reimplemented in eZMySQLDB, and eZMySQLiDB.
Definition at line 1225 of file ezdbinterface.php.
Referenced by dropTempTableList().
| eZDBInterface::dropTempTableList | ( | $ | tableList, |
| $ | server = self::SERVER_SLAVE |
||
| ) |
Drop temporary table list
Definition at line 1233 of file ezdbinterface.php.
| eZDBInterface::endTime | ( | ) | [private] |
Definition at line 403 of file ezdbinterface.php.
| eZDBInterface::endTimer | ( | ) | [private] |
Stops the current timer and calculates the time taken.
Definition at line 382 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\query(), eZMySQLiDB\query(), and eZMySQLDB\query().
| eZDBInterface::errorMessage | ( | ) |
Returns the error message
Definition at line 1250 of file ezdbinterface.php.
| eZDBInterface::errorNumber | ( | ) |
Returns the error number
Definition at line 1258 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 1176 of file ezdbinterface.php.
| eZDBInterface::eZDBInterface | ( | $ | parameters | ) |
Create a new eZDBInterface object and connects to the database backend.
Definition at line 70 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 1082 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 835 of file ezdbinterface.php.
| eZDBInterface::generateFailedTransactionStackEntry | ( | $ | stack, |
| $ | indentCount | ||
| ) | [private] |
Recursive helper function for generating stack tree output.
Definition at line 849 of file ezdbinterface.php.
Referenced by generateFailedTransactionStack().
| eZDBInterface::generateSQLINStatement | ( | $ | elements, |
| $ | columnName = '', |
||
| $ | not = false, |
||
| $ | unique = true, |
||
| $ | type = false |
||
| ) |
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, ) );
| int | array | $elements | Elements that should (not) be matched by the IN statment as an integer or anonymous array |
| string | $columnName | Column name of the database table the IN statement should be created for |
| bool | $not | Will generate a "NOT IN" ( if set to true ) statement instead of an "IN" ( if set to false , default ) |
| $unique | Wether or not to make the array unique. Not implemented in this class, but can be used by extending classes (oracle does use it) | |
| $type | The type to cast the array elements to |
Definition at line 1338 of file ezdbinterface.php.
| eZDBInterface::generateTraceEntry | ( | $ | entry | ) | [private] |
Helper function for generating output for one stack-trace entry.
Definition at line 896 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 1280 of file ezdbinterface.php.
| eZDBInterface::hasAttribute | ( | $ | name | ) |
true if the attribute $name exists for this database handler. Definition at line 202 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 532 of file ezdbinterface.php.
| eZDBInterface::implodeWithTypeCast | ( | $ | glue, |
| &$ | pieces, | ||
| $ | type | ||
| ) |
Definition at line 1149 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 299 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 952 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 562 of file ezdbinterface.php.
| eZDBInterface::isConnected | ( | ) | [protected] |
Returns true if we're connected to the database backend.
Definition at line 1193 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 1046 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 1168 of file ezdbinterface.php.
| eZDBInterface::lock | ( | $ | table | ) | [pure virtual] |
Locks a table
Implemented in eZMySQLDB, eZMySQLiDB, eZPostgreSQLDB, and eZNullDB.
Definition at line 637 of file ezdbinterface.php.
| eZDBInterface::md5 | ( | $ | str | ) | [pure virtual] |
Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 501 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 250 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 609 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 1074 of file ezdbinterface.php.
| eZDBInterface::relationCounts | ( | $ | relationMask | ) | [pure virtual] |
Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 1066 of file ezdbinterface.php.
| eZDBInterface::relationList | ( | $ | relationType = eZDBInterface::RELATION_TABLE | ) | [pure virtual] |
Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 1090 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 1135 of file ezdbinterface.php.
| eZDBInterface::relationName | ( | $ | relationType | ) | [protected] |
Definition at line 1109 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\removeRelation(), eZMySQLiDB\removeRelation(), and eZMySQLDB\removeRelation().
| eZDBInterface::removeDatabase | ( | $ | dbName | ) | [pure virtual] |
Removes a database
Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 1210 of file ezdbinterface.php.
| 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 1099 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 965 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\query(), eZMySQLiDB\query(), and eZMySQLDB\query().
| eZDBInterface::reportQuery | ( | $ | class, |
| $ | sql, | ||
| $ | numRows, | ||
| $ | timeTaken, | ||
| $ | asDebug = false |
||
| ) | [private] |
Writes a debug notice with query information.
Definition at line 347 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 801 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 941 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 1243 of file ezdbinterface.php.
| eZDBInterface::setIsSQLOutputEnabled | ( | $ | enabled | ) |
Enabled or disables sql output.
Definition at line 362 of file ezdbinterface.php.
| eZDBInterface::socketPath | ( | ) |
false if no socket path was defined. Definition at line 430 of file ezdbinterface.php.
| eZDBInterface::startTime | ( | ) | [private] |
Definition at line 394 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 372 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 483 of file ezdbinterface.php.
| eZDBInterface::supportedRelationTypeMask | ( | ) | [pure virtual] |
Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 456 of file ezdbinterface.php.
| eZDBInterface::supportedRelationTypes | ( | ) | [pure virtual] |
Implemented in eZMySQLDB, eZMySQLiDB, and eZPostgreSQLDB.
Definition at line 474 of file ezdbinterface.php.
| eZDBInterface::supportsDefaultValuesInsertion | ( | ) |
Reimplemented in eZMySQLDB, and eZMySQLiDB.
Definition at line 1358 of file ezdbinterface.php.
| eZDBInterface::timeTaken | ( | ) | [private] |
Definition at line 412 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 1057 of file ezdbinterface.php.
| eZDBInterface::unlock | ( | ) | [pure virtual] |
Releases table locks.
Implemented in eZMySQLDB, eZMySQLiDB, eZPostgreSQLDB, and eZNullDB.
Definition at line 645 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 581 of file ezdbinterface.php.
| eZDBInterface::useShortNames | ( | ) | [pure virtual] |
Definition at line 465 of file ezdbinterface.php.
| eZDBInterface::version | ( | ) |
Get database version number
Definition at line 1302 of file ezdbinterface.php.
| eZDBInterface::$Charset |
The charset used for the current database.
Definition at line 1381 of file ezdbinterface.php.
| eZDBInterface::$ConnectRetries |
The number of times to retry a connection if it fails.
Definition at line 1383 of file ezdbinterface.php.
| eZDBInterface::$DB |
The current database name.
Definition at line 1371 of file ezdbinterface.php.
| eZDBInterface::$DBConnection |
The current connection, false if not connection has been made.
Definition at line 1373 of file ezdbinterface.php.
| eZDBInterface::$DBWriteConnection |
Contains the write database connection if used.
Definition at line 1375 of file ezdbinterface.php.
| eZDBInterface::$EndTime |
The end time of the tiemr.
Definition at line 1399 of file ezdbinterface.php.
| eZDBInterface::$ErrorMessage |
The database error message of the last executed function.
Definition at line 1403 of file ezdbinterface.php.
| eZDBInterface::$ErrorNumber = 0 |
The database error message number of the last executed function.
Definition at line 1405 of file ezdbinterface.php.
| eZDBInterface::$InputTextCodec |
Definition at line 1386 of file ezdbinterface.php.
| eZDBInterface::$IsConnected = false |
Contains true if we're connected to the database backend.
Definition at line 1393 of file ezdbinterface.php.
| eZDBInterface::$NumQueries = 0 |
Contains number of queries sended to DB.
Definition at line 1395 of file ezdbinterface.php.
| eZDBInterface::$OutputSQL |
Setting if SQL queries should be sent to debug output.
Definition at line 1391 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 1385 of file ezdbinterface.php.
| eZDBInterface::$Password |
Stores the database connection password.
Definition at line 1379 of file ezdbinterface.php.
| eZDBInterface::$Port |
Contains the current port.
Definition at line 1367 of file ezdbinterface.php.
| eZDBInterface::$RecordError = true |
If true then ErrorMessage and ErrorNumber get filled.
Definition at line 1407 of file ezdbinterface.php.
| eZDBInterface::$Server |
Contains the current server.
Definition at line 1365 of file ezdbinterface.php.
| eZDBInterface::$SlaveDB |
The slave database name.
Definition at line 1413 of file ezdbinterface.php.
| eZDBInterface::$SlavePassword |
The slave database user password.
Definition at line 1421 of file ezdbinterface.php.
| eZDBInterface::$SlavePort |
The slave server port.
Definition at line 1417 of file ezdbinterface.php.
| eZDBInterface::$SlaveServer |
The slave server name.
Definition at line 1415 of file ezdbinterface.php.
| eZDBInterface::$SlaveUser |
The slave database user.
Definition at line 1419 of file ezdbinterface.php.
| eZDBInterface::$SocketPath |
The socket path, used by MySQL.
Definition at line 1369 of file ezdbinterface.php.
| eZDBInterface::$StartTime |
The start time of the timer.
Definition at line 1397 of file ezdbinterface.php.
| eZDBInterface::$TimeTaken |
The total number of milliseconds the timer took.
Definition at line 1401 of file ezdbinterface.php.
| eZDBInterface::$TransactionCounter |
The transaction counter, 0 means no transaction.
Definition at line 1423 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 1426 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 1389 of file ezdbinterface.php.
| eZDBInterface::$UsePersistentConnection = false |
If true then the database connection should be persistent.
Definition at line 1409 of file ezdbinterface.php.
| eZDBInterface::$User |
Stores the database connection user.
Definition at line 1377 of file ezdbinterface.php.
| eZDBInterface::$UserSlaveServer |
Contains true if slave servers are enabled.
Definition at line 1411 of file ezdbinterface.php.
| const eZDBInterface::BINDING_NAME = 1 |
Definition at line 44 of file ezdbinterface.php.
| const eZDBInterface::BINDING_NO = 0 |
Definition at line 43 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\bindingType(), eZMySQLiDB\bindingType(), eZMySQLDB\bindingType(), eZSession\internalWrite(), eZPersistentObject\storeObject(), and eZPersistentObject\updateObjectList().
| const eZDBInterface::BINDING_ORDERED = 2 |
Definition at line 45 of file ezdbinterface.php.
| const eZDBInterface::ERROR_MISSING_EXTENSION = 1 |
Definition at line 62 of file ezdbinterface.php.
Referenced by eZMySQLDB\eZMySQLDB(), eZMySQLiDB\eZMySQLiDB(), and eZPostgreSQLDB\eZPostgreSQLDB().
| const eZDBInterface::RELATION_INDEX = 4 |
Definition at line 51 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\relationKind(), relationName(), and eZPostgreSQLDB\supportedRelationTypes().
| const eZDBInterface::RELATION_INDEX_BIT = 16 |
Definition at line 57 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\supportedRelationTypeMask().
| const eZDBInterface::RELATION_MASK = 31 |
Definition at line 60 of file ezdbinterface.php.
| const eZDBInterface::RELATION_NONE = 0 |
Definition at line 59 of file ezdbinterface.php.
Referenced by supportedRelationTypeMask().
| const eZDBInterface::RELATION_SEQUENCE = 1 |
Definition at line 48 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\eZTableList(), eZPostgreSQLDB\relationKind(), relationName(), and eZPostgreSQLDB\supportedRelationTypes().
| const eZDBInterface::RELATION_SEQUENCE_BIT = 2 |
Definition at line 54 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\supportedRelationTypeMask().
| const eZDBInterface::RELATION_TABLE = 0 |
Definition at line 47 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 53 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 49 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\relationKind(), relationName(), and eZPostgreSQLDB\supportedRelationTypes().
| const eZDBInterface::RELATION_TRIGGER_BIT = 4 |
Definition at line 55 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\supportedRelationTypeMask().
| const eZDBInterface::RELATION_VIEW = 3 |
Definition at line 50 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\relationKind(), relationName(), and eZPostgreSQLDB\supportedRelationTypes().
| const eZDBInterface::RELATION_VIEW_BIT = 8 |
Definition at line 56 of file ezdbinterface.php.
Referenced by eZPostgreSQLDB\supportedRelationTypeMask().
| const eZDBInterface::SERVER_MASTER = 1 |
Definition at line 64 of file ezdbinterface.php.
Referenced by eZMySQLiDB\query(), and eZMySQLDB\query().
| const eZDBInterface::SERVER_SLAVE = 2 |
Definition at line 65 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().