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

Class: IsterSqlDriverDbx

Source Location: /IsterSqlDriverDbx.php

Class Overview

IsterObject
   |
   --IsterSqlDriver
      |
      --IsterSqlDriverDbx

The Dbx driver of the package.


Author(s): Ingo Schramm   

Version: 0.4.0

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 Dbx driver of the package.

You may use this as a meta abstraction layer to connect to databases not supported directly but supported by the dbx extension.

It is recommended to use the native drivers if possible and to use this only if no native driver is available.


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


[ Top ]


Class Methods


constructor IsterSqlDriverDbx

IsterSqlDriverDbx IsterSqlDriverDbx( )

Constructor

[ Top ]

method asyncQuery

boolean asyncQuery( mixed $query)

Send an asynchronous query.

Note: PHP < 5.0 cannot handle unbuffered queries.


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

method close

boolean close( )

Close the current connection.

[ Top ]

method connect

boolean connect( [boolean $newlink = false])

Establish a connection.

Parameters:

boolean   $newlink   Force a new link to be created.

[ 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 or link are invalid. This driver cannot return the number of affected rows for non select queries. In this case always 1 is returned.


return:  Number of rows in current result set, false on error
[ Top ]

method escapeString

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

Escape a string.

Parameters:

string   $string  
boolean   $binary   ignored by this driver

[ Top ]

method fetchObject

object IsterSqlRow fetchObject( )

Fetch the next IsterSqlRow object of the current result set.

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

method free

resource free( )

Free the current result set.

If the last query was an asyncQuery(), the connection will be reopened.


[ Top ]

method getLastError

string getLastError( )

Get the last MySQL 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 // currently used database
  5. 'module' => $int // port number
  6. );


[ 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 = false])

Establish a persistent connection.

[ Top ]

method query

boolean query( mixed $query)

Send a query.

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

method setConnection

boolean setConnection( string $server, string $username, string $password, string $db, integer $module)

Setup the connection.

Note that this method will not connect to the databse, use connect() to establish a connection.

See also the documentation for dbx extension.


return:  true on success
Overrides IsterSqlDriver::setConnection() (Setup the connection.)

Parameters:

string   $server  
string   $username  
string   $password  
string   $db  
integer   $module  

[ 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 string.

Parameters:

string   $string  
boolean   $binary   ignored by driver

[ Top ]


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