OCI8Connection Class Reference

Inherits ConnectionCommon, and Connection.

List of all members.

Public Member Functions

Protected Attributes


Member Function Documentation

void OCI8Connection::connect ( $dsninfo, $flags = 0 )

 

Connect to a database and log in as the specified user.

Parameters
array $dsn The data source hash.
int $flags Any connection flags. public

Exceptions
SQLException 

Returns void

Implements Connection.

OCI8Connection::close ( )

 

See also Connection::disconnect()

Implements Connection.

OCI8Connection::executeQuery ( $sql, $fetchmode = null )

 

See also Connection::executeQuery()

Implements Connection.

OCI8Connection::executeUpdate ( $sql )

 

See also Connection::simpleUpdate()

Implements Connection.

OCI8Connection::commit ( )

 

Commit the current transaction.

Implements Connection.

void OCI8Connection::rollback ( )

 

Roll back (undo) the current transaction.
Exceptions
SQLException 

Returns void

Implements Connection.

int OCI8Connection::getUpdateCount ( )

 

Gets the number of rows affected by the data manipulation query.

Returns int Number of rows affected by the last query.

Todo:
-cOCI8Connection Figure out whether getUpdateCount() should throw exception on error or just return 0.

Implements Connection.

void OCI8Connection::applyLimit ( & $sql, $offset, $limit )

 

Build Oracle-style query with limit or offset. If the original SQL is in variable: query then the requlting SQL looks like this:

 SELECT B.* FROM (
          SELECT A.*, rownum as TORQUE$ROWNUM FROM (
                  query
          ) A
     ) B WHERE B.TORQUE$ROWNUM > offset AND B.TORQUE$ROWNUM
     <= offset + limit
 

Parameters
string &$sql the query
int $offset
int $limit

Returns void ($sql parameter is currently manipulated directly)

Reimplemented from ConnectionCommon.

OCI8Connection::nativeError ( $result = null )

 

Get the native Oracle Error Message as a string.

Parameters
string $msg The Internal Error Message
mixed $errno The Oracle Error resource

OCI8Connection::getDatabaseInfo ( )

 

See also Connection::getDatabaseInfo()

Implements Connection.

OCI8Connection::getIdGenerator ( )

 

See also Connection::getIdGenerator()

Implements Connection.

OCI8Connection::prepareStatement ( $sql )

 

Oracle supports native prepared statements, but the OCIParse call is actually called by the OCI8PreparedStatement class because some additional SQL processing may be necessary (e.g. to apply limit).
See also OCI8PreparedStatement::executeQuery()

OCI8PreparedStatement::executeUpdate()

Connection::prepareStatement()

Implements Connection.

OCI8Connection::prepareCall ( $sql )

 

See also Connection::prepareCall()

Reimplemented from ConnectionCommon.

OCI8Connection::createStatement ( )

 

See also Connection::createStatement()

Implements Connection.


Member Data Documentation

OCI8Connection::$lastStmt = null [protected]

 


This file is part of the Creole[php5] library.


Copyright © 2004 Hans Lellelid  
Creole[php5] CVS