Public Member Functions | |
| __construct ($user, $pwd, $server, $dbname, $pfx='', $debug=false) | |
| getServerInfo () | |
| debug ($query) | |
| close () | |
| select ($query) | |
| execute ($query) | |
| getLastID () | |
| getError () | |
| esc ($str) | |
| setSearchPath ($search_path='public') | |
| qn ($col) | |
| begin () | |
| commit () | |
| rollback () | |
| __toString () | |
Public Attributes | |
| $con_id | |
| $pfx = '' | |
| $lastquery = '' | |
| $engine = 'PostgreSQL' | |
| $type_cast = array() | |
| $search_path = 'public' | |
Private Attributes | |
| $debug = false | |
| $cur = null | |
| Pluf_DB_PostgreSQL::__construct | ( | $ | user, | |
| $ | pwd, | |||
| $ | server, | |||
| $ | dbname, | |||
| $ | pfx = '', |
|||
| $ | debug = false | |||
| ) |
| Pluf_DB_PostgreSQL::getServerInfo | ( | ) |
Get the version of the PostgreSQL server.
Requires PostgreSQL 7.4 or later.
| Pluf_DB_PostgreSQL::debug | ( | $ | query | ) |
Log the queries. Keep track of the last query and if in debug mode keep track of all the queries in $GLOBALS['_PX_debug_data']['sql_queries']
| string | Query to keep track |
| Pluf_DB_PostgreSQL::close | ( | ) |
| Pluf_DB_PostgreSQL::select | ( | $ | query | ) |
| Pluf_DB_PostgreSQL::execute | ( | $ | query | ) |
| Pluf_DB_PostgreSQL::getLastID | ( | ) |
| Pluf_DB_PostgreSQL::getError | ( | ) |
Returns a string ready to be used in the exception.
| Pluf_DB_PostgreSQL::esc | ( | $ | str | ) |
| Pluf_DB_PostgreSQL::setSearchPath | ( | $ | search_path = 'public' |
) |
Set the current search path.
| Pluf_DB_PostgreSQL::qn | ( | $ | col | ) |
Quote the column name.
| string | Name of the column |
| Pluf_DB_PostgreSQL::begin | ( | ) |
Start a transaction.
| Pluf_DB_PostgreSQL::commit | ( | ) |
Commit a transaction.
| Pluf_DB_PostgreSQL::rollback | ( | ) |
Rollback a transaction.
| Pluf_DB_PostgreSQL::__toString | ( | ) |
| Pluf_DB_PostgreSQL::$con_id |
The connection resource.
| Pluf_DB_PostgreSQL::$pfx = '' |
The prefix for the table names.
Pluf_DB_PostgreSQL::$debug = false [private] |
Debug mode.
| Pluf_DB_PostgreSQL::$lastquery = '' |
The last query, set with debug(). Used when an error is returned.
| Pluf_DB_PostgreSQL::$engine = 'PostgreSQL' |
Name of the engine.
| Pluf_DB_PostgreSQL::$type_cast = array() |
Pluf_DB_PostgreSQL::$cur = null [private] |
Current query cursor.
| Pluf_DB_PostgreSQL::$search_path = 'public' |
Current search path.