sql 
[ doc home ] [ class tree: sql ] [ index: sql ] [ all elements ]

Class: IsterSqlDriverPostgresql

Source Location: /IsterSqlDriverPostgresql.php

Class Overview

IsterObject
   |
   --IsterSqlDriver
      |
      --IsterSqlDriverPostgresql

The PostgreSQL driver of the package.


Author(s): Ingo Schramm   

Copyright: Copyright (c) 2005 Ister.ORG Ingo Schramm

Methods


Inherited Constants

Inherited Variables

Inherited Methods

Class: IsterSqlDriver

IsterSqlDriver::IsterSqlDriver()
Constructor
IsterSqlDriver::getConnection()
Return the current connection parameters.
IsterSqlDriver::getLink()
Return the current connection resource.
IsterSqlDriver::setConnection()
Setup the connection.

Class: IsterObject

IsterObject::IsterObject()
Constructor
IsterObject::abstractMethodError()
Report attempt to call an abstract method.
IsterObject::addLogger()
Add an IsterLogger to process log messages.
IsterObject::deleteLogger()
Delete an already registered IsterLogger.
IsterObject::getLoggerNames()
Fetch the names of all currently registered IsterLoggers.
IsterObject::getMem()
Return maximum amount of memory an application has allocated at this point.
IsterObject::log()
Trigger a log message.
IsterObject::passPHPmessage()
Catch PHP E_WARNING and E_NOTICE messages.
IsterObject::serialize()
Serialize the object.
IsterObject::setLogLocal()
Set logging local for the current object.
IsterObject::setupLogger()
Setup a logger.
IsterObject::triggerError()
Alias for log();
IsterObject::unserialize()
Unserialize the object.
IsterObject::__sleep()
Executed prior to serialize().
IsterObject::__wakeup()
Executed prior to unserialize().

Class Details

The PostgreSQL driver of the package.

Note: There is currently no special support for PostgreSQL 'large objects'.


copyright:  Copyright (c) 2005 Ister.ORG Ingo Schramm
author:  Ingo Schramm


[ Top ]


Class Methods


constructor IsterSqlDriverPostgresql

IsterSqlDriverPostgresql IsterSqlDriverPostgresql( )

[ Top ]

method asyncQuery

boolean asyncQuery( mixed $query)

Send an asynchronous query.

return:  true on success, false on error
[ Top ]

method close

boolean close( )

Close the current connection.

[ Top ]

method connect

boolean connect( [boolean $newlink = true])

Establish a connection.

For PostgreSQL the $newlink parameter does not force the creation of a new link since the pgsql extension does not allow this. Instead the connection will be reset.


Parameters:

boolean   $newlink  

[ Top ]

method countRows

integer countRows( )

Count the rows in the current result set.

The method returns 0 without any warning if the current result ressource is invalid.


return:  Number of rows in current result set
[ Top ]

method escapeString

string escapeString( string $string, [boolean $binary = false])

Parameters:

string   $string  
boolean   $binary  

[ Top ]

method fetchObject

object IsterSqlRow fetchObject( )

Fetch the next IsterSqlRow object of the current result set.

return:  object, null on error or if no more rows are left.
see:  IsterSqlRow
[ Top ]

method free

resource free( )

Free the current result set.

[ Top ]

method getLastError

string getLastError( )

Get the last PostgreSQL or driver error.

[ Top ]

method info

array info( )

This function returns useful information about the active driver.

  1. array( 'driver_name' => $str // name of the driver
  2. 'driver_version' => $str // dotted version number
  3. 'host' => $str // name or IP of the servers host
  4. 'dbname' => $str // current used database
  5. 'port' => $int // port number
  6. 'client_encoding' => $str // client encoding
  7. 'server_pid' => $str // backend PID
  8. 'options' => $str // options specified on the connection
  9. 'tty' => $str // version of used protokoll
  10. );


[ Top ]

method isConnected

boolean isConnected( )

Check whether a connection is established.

[ Top ]

method lastWasRead

boolean lastWasRead( )

Check whether the last query was a read (SELECT) operation or not.

[ Top ]

method pconnect

boolean pconnect( [mixed $newlink = true])

Establish a persistent connection.

[ Top ]

method query

boolean query( mixed $query)

Send a query.

return:  true on success, false on error
[ Top ]

method setLink

boolean setLink( resource $link)

Set the current connection resource.

return:  true on success, false on failure

Parameters:

resource   $link  

[ Top ]

method unescapeString

string unescapeString( string $string, [boolean $binary = false])

Unescape a previously escaped string.

For binary strings the method is expensive in time and memory consumption. This is because pg_unescape_bytea() returns a string containing an octal representation of the binary data, which must be parsed by this method to become binary again.


Parameters:

string   $string  
boolean   $binary  

[ Top ]


Documentation generated on Tue, 20 Dec 2005 11:21:15 +0100 by phpDocumentor 1.3.0RC4