Pluf_DB_PostgreSQL Class Reference

List of all members.

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


Detailed Description

PostgreSQL connection class

Constructor & Destructor Documentation

Pluf_DB_PostgreSQL::__construct ( user,
pwd,
server,
dbname,
pfx = '',
debug = false 
)


Member Function Documentation

Pluf_DB_PostgreSQL::getServerInfo (  ) 

Get the version of the PostgreSQL server.

Requires PostgreSQL 7.4 or later.

Returns:
string Version string

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']

Parameters:
string Query to keep track
Returns:
bool true

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.

Returns:
string Error string

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.

Parameters:
string Name of the column
Returns:
string Escaped name

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 (  ) 


Member Data Documentation

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()

Used by the model to convert the values from and to the database.

See also:
Pluf_DB_defaultTypecast

Pluf_DB_PostgreSQL::$cur = null [private]

Current query cursor.

Pluf_DB_PostgreSQL::$search_path = 'public'

Current search path.


The documentation for this class was generated from the following file:

Generated on Wed Feb 3 15:44:51 2010 for Pluf by  doxygen