creole.drivers.oracle
[ class tree: creole.drivers.oracle ] [ index: creole.drivers.oracle ] [ all elements ]

Class: OCI8Connection

Source Location: /creole/drivers/oracle/OCI8Connection.php

Class Overview

ConnectionCommon
   |
   --OCI8Connection

Oracle implementation of Connection.


Author(s):

Version:

  • $Revision: 1.13 $

Variables

Methods


Inherited Variables

Inherited Methods

Class: ConnectionCommon

ConnectionCommon::getAutoCommit()
Get auto-commit status.
ConnectionCommon::getDSN()
ConnectionCommon::getFlags()
ConnectionCommon::getResource()
ConnectionCommon::prepareCall()
Creates a CallableStatement object for calling database stored procedures.
ConnectionCommon::setAutoCommit()
Enable/disable automatic commits.
ConnectionCommon::__sleep()
This "magic" method is invoked upon serialize() and works in tandem with the __wakeup() method to ensure that your database connection is serializable.
ConnectionCommon::__wakeup()
This "magic" method is invoked upon unserialize().

Class Details

[line 35]
Oracle implementation of Connection.



Tags:

version:  $Revision: 1.13 $
author:  David Giffin <david@giffin.org>
author:  Hans Lellelid <hans@xmpl.org>
author:  Stig Bakken <ssb@fast.no>
author:  Lukas Smith


[ Top ]


Class Variables

$lastStmt =  null

[line 37]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


method applyLimit [line 215]

void applyLimit( string &$sql, int $offset, int $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




Tags:

return:  ($sql parameter is currently manipulated directly)
access:  public


Parameters:

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

[ Top ]

method close [line 88]

void close( )



Tags:

see:  Connection::disconnect()


[ Top ]

method commit [line 147]

void commit( )

Commit the current transaction.



[ Top ]

method connect [line 48]

void connect( mixed $dsninfo, [int $flags = 0], array $dsn)

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



Tags:

throws:  SQLException
access:  public


Parameters:

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

[ Top ]

method createStatement [line 289]

void createStatement( )



Tags:

access:  public
see:  Connection::createStatement()


[ Top ]

method executeQuery [line 96]

void executeQuery( mixed $sql, [mixed $fetchmode = null])



Tags:



[ Top ]

method executeUpdate [line 119]

void executeUpdate( mixed $sql)



Tags:

see:  Connection::simpleUpdate()


[ Top ]

method getDatabaseInfo [line 250]

void getDatabaseInfo( )



Tags:

access:  public
see:  Connection::getDatabaseInfo()


[ Top ]

method getIdGenerator [line 259]

void getIdGenerator( )



Tags:

access:  public
see:  Connection::getIdGenerator()


[ Top ]

method getUpdateCount [line 184]

int getUpdateCount( )

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



Tags:

return:  Number of rows affected by the last query.
todo:  -cOCI8Connection Figure out whether getUpdateCount() should throw exception on error or just return 0.


[ Top ]

method nativeError [line 236]

void nativeError( [mixed $result = null], string $msg, mixed $errno)

Get the native Oracle Error Message as a string.



Tags:

access:  public


Parameters:

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

[ Top ]

method prepareCall [line 282]

void prepareCall( mixed $sql)



Tags:

access:  public
see:  Connection::prepareCall()


Overrides ConnectionCommon::prepareCall() (Creates a CallableStatement object for calling database stored procedures.)

[ Top ]

method prepareStatement [line 273]

void prepareStatement( mixed $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).



Tags:



[ Top ]

method rollback [line 165]

void rollback( )

Roll back (undo) the current transaction.



Tags:

throws:  SQLException


[ Top ]


Documentation generated on Mon, 23 Aug 2004 21:51:59 -0400 by phpDocumentor 1.3.0RC3