|
eZ Publish
[4.2]
|
The eZPostgreSQLDB class provides PostgreSQL database functions. More...
Inheritance diagram for eZPostgreSQLDB:
Collaboration diagram for eZPostgreSQLDB:Public Member Functions | |
| arrayQuery ($sql, $params=array(), $server=false) | |
| availableDatabases () | |
| beginQuery () | |
| bindingType () | |
| bindVariable ($value, $fieldDef=false) | |
| close () | |
| commitQuery () | |
| concatString ($strings=array()) | |
| correctSequenceValues () | |
| createDatabase ($dbName) | |
| databaseName () | |
| databaseServerVersion () | |
| escapeString ($str) | |
| eZPostgreSQLDB ($parameters) | |
| eZTableList ($server=eZDBInterface::SERVER_MASTER) | |
| isCharsetSupported ($charset) | |
| lastSerialID ($table=false, $column= 'id') | |
| Returns the last serial ID generated with an auto increment field. | |
| 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 () | |
| supportedRelationTypeMask () | |
| supportedRelationTypes () | |
| unlock () | |
Private Member Functions | |
| relationKind ($relationType) | |
| subString ($string, $from, $len=null) | |
The eZPostgreSQLDB class provides PostgreSQL database functions.
eZPostgreSQLDB implementes PostgreSQLDB specific database code.
Definition at line 42 of file ezpostgresqldb.php.
| eZPostgreSQLDB::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 202 of file ezpostgresqldb.php.
Referenced by correctSequenceValues(), eZTableList(), relationCount(), relationCounts(), and relationList().
| eZPostgreSQLDB::availableDatabases | ( | ) |
Return alvailable databases in database.
Reimplemented from eZDBInterface.
Definition at line 130 of file ezpostgresqldb.php.
| eZPostgreSQLDB::beginQuery | ( | ) |
The query to start the transaction.
Reimplemented from eZDBInterface.
Definition at line 491 of file ezpostgresqldb.php.
| eZPostgreSQLDB::bindingType | ( | ) | [virtual] |
Returns type of binding used in database plugin.
Implements eZDBInterface.
Definition at line 155 of file ezpostgresqldb.php.
| eZPostgreSQLDB::bindVariable | ( | $ | value, |
| $ | fieldDef = false |
||
| ) | [virtual] |
| eZPostgreSQLDB::close | ( | ) | [virtual] |
Will close the database connection.
Implements eZDBInterface.
Definition at line 567 of file ezpostgresqldb.php.
| eZPostgreSQLDB::commitQuery | ( | ) |
The query to commit the transaction.
Reimplemented from eZDBInterface.
Definition at line 499 of file ezpostgresqldb.php.
| eZPostgreSQLDB::concatString | ( | $ | strings = array() | ) | [virtual] |
Implements eZDBInterface.
Definition at line 286 of file ezpostgresqldb.php.
| eZPostgreSQLDB::correctSequenceValues | ( | ) |
Sets PostgreSQL sequence values to the maximum values used in the corresponding columns.
Definition at line 622 of file ezpostgresqldb.php.
| eZPostgreSQLDB::createDatabase | ( | $ | dbName | ) | [virtual] |
| eZPostgreSQLDB::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 150 of file ezpostgresqldb.php.
| eZPostgreSQLDB::databaseServerVersion | ( | ) |
false if no version could be retrieved/ Reimplemented from eZDBInterface.
Definition at line 595 of file ezpostgresqldb.php.
| eZPostgreSQLDB::escapeString | ( | $ | str | ) | [virtual] |
Will escape a string so it's ready to be inserted in the database.
Implements eZDBInterface.
Definition at line 560 of file ezpostgresqldb.php.
| eZPostgreSQLDB::eZPostgreSQLDB | ( | $ | parameters | ) |
Creates a new eZPostgreSQLDB object and connects to the database.
Definition at line 47 of file ezpostgresqldb.php.
| eZPostgreSQLDB::eZTableList | ( | $ | server = eZDBInterface::SERVER_MASTER | ) | [virtual] |
Implements eZDBInterface.
Definition at line 418 of file ezpostgresqldb.php.
| eZPostgreSQLDB::isCharsetSupported | ( | $ | charset | ) |
true if the charset $charset is supported by the connected database. Reimplemented from eZDBInterface.
Definition at line 590 of file ezpostgresqldb.php.
| eZPostgreSQLDB::lastSerialID | ( | $ | table = false, |
| $ | column = 'id' |
||
| ) | [virtual] |
Returns the last serial ID generated with an auto increment field.
In this case that means the current value of the sequence assigned $table
| string | $table | |
| string | $column |
Implements eZDBInterface.
Definition at line 522 of file ezpostgresqldb.php.
| eZPostgreSQLDB::lock | ( | $ | table | ) | [virtual] |
| eZPostgreSQLDB::md5 | ( | $ | str | ) | [virtual] |
Implements eZDBInterface.
Definition at line 292 of file ezpostgresqldb.php.
| eZPostgreSQLDB::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 165 of file ezpostgresqldb.php.
Referenced by arrayQuery(), availableDatabases(), beginQuery(), commitQuery(), correctSequenceValues(), createDatabase(), lock(), removeDatabase(), removeRelation(), and rollbackQuery().
| eZPostgreSQLDB::relationCount | ( | $ | relationType = eZDBInterface::RELATION_TABLE | ) | [virtual] |
Implements eZDBInterface.
Definition at line 370 of file ezpostgresqldb.php.
| eZPostgreSQLDB::relationCounts | ( | $ | relationMask | ) | [virtual] |
Implements eZDBInterface.
Definition at line 330 of file ezpostgresqldb.php.
| eZPostgreSQLDB::relationKind | ( | $ | relationType | ) | [private] |
Definition at line 318 of file ezpostgresqldb.php.
Referenced by eZTableList(), relationCount(), relationCounts(), and relationList().
| eZPostgreSQLDB::relationList | ( | $ | relationType = eZDBInterface::RELATION_TABLE | ) | [virtual] |
Implements eZDBInterface.
Definition at line 394 of file ezpostgresqldb.php.
| eZPostgreSQLDB::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 435 of file ezpostgresqldb.php.
| eZPostgreSQLDB::removeDatabase | ( | $ | dbName | ) | [virtual] |
| eZPostgreSQLDB::removeRelation | ( | $ | relationName, |
| $ | relationType | ||
| ) | [virtual] |
Tries to remove the relation type $relationType named $relationName
true if successful Implements eZDBInterface.
Definition at line 440 of file ezpostgresqldb.php.
| eZPostgreSQLDB::rollbackQuery | ( | ) |
The query to cancel the transaction.
Reimplemented from eZDBInterface.
Definition at line 507 of file ezpostgresqldb.php.
| eZPostgreSQLDB::setError | ( | ) | [virtual] |
Sets the error message and error message number
Implements eZDBInterface.
Definition at line 542 of file ezpostgresqldb.php.
Referenced by createDatabase(), query(), and removeDatabase().
| eZPostgreSQLDB::subString | ( | $ | string, |
| $ | from, | ||
| $ | len = null |
||
| ) | [private, virtual] |
Implements eZDBInterface.
Definition at line 274 of file ezpostgresqldb.php.
| eZPostgreSQLDB::supportedRelationTypeMask | ( | ) | [virtual] |
Implements eZDBInterface.
Definition at line 297 of file ezpostgresqldb.php.
| eZPostgreSQLDB::supportedRelationTypes | ( | ) | [virtual] |
Implements eZDBInterface.
Definition at line 306 of file ezpostgresqldb.php.
Referenced by relationCounts().
| eZPostgreSQLDB::unlock | ( | ) | [virtual] |