Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

OracleConnection Class Reference

Obsolete class - implementation of Connection interface using Oracle v. 7 OCI. Use Oracle8iConnection instead. More...

#include <cOracleConnection.h>

Inheritance diagram for OracleConnection:

Inheritance graph
[legend]
Collaboration diagram for OracleConnection:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~OracleConnection ()
virtual bool Sql (const char *sqlCommand)
virtual bool Commit ()
virtual bool Rollback ()
virtual bool Savepoint (const char *name)
virtual bool RollbackToSavepoint (const char *name)
virtual bool Disconnect ()
virtual bool Abort ()
virtual bool Autocommit (bool ac)

Protected Member Functions

 OracleConnection (class Database *DB, const char *UserName, const char *Password, const int LocHandle, const int GlobHandle)
virtual bool _Sql (const char *sqlCommand)
virtual bool _Commit ()
virtual bool _Rollback ()
virtual bool _Savepoint (const char *name)
virtual bool _RollbackToSavepoint (const char *name)
virtual bool _NextOID (long int &nxtoid, long int &nxtsn)
virtual bool _NextSN (long int curoid, long int &nxtsn)
virtual Cursor_GetNewCursor ()

Protected Attributes

Lda_Def _LDA
ub1 _HDA [HDA_SIZE]

Detailed Description

Obsolete class - implementation of Connection interface using Oracle v. 7 OCI. Use Oracle8iConnection instead.

Warning:
This class uses cursors of type OracleCursor. This cursor doesn't correctly implement methods Cursor::_PreExecBind(const char *,const int,const void *,const int,const IopcDataType,bool) and Cursor::_PreFetchBind(const int,const void *,const int,const IopcDataType,bool *).
This class was nearly undocumented in POLiTe - a few of old comments can be found in source code - not in doxygen. I (Josef Troch) have added some comments, but persistence layer IOPC does not use this class!


Constructor & Destructor Documentation

OracleConnection::OracleConnection class Database DB,
const char *  UserName,
const char *  Password,
const int  LocHandle,
const int  GlobHandle
[protected]
 

OracleConnection::~OracleConnection  )  [virtual]
 


Member Function Documentation

bool OracleConnection::_Sql const char *  sqlCommand  )  [protected, virtual]
 

Processes SQL command (sqlCommand) - calls _Open(), _Prepare(), _Execute() and _Close() for it.

Parameters:
sqlCommand SQL statement to be processed.

Reimplemented from Connection.

bool OracleConnection::_Commit  )  [protected, virtual]
 

Commits actual transaction.

Implements Connection.

bool OracleConnection::_Rollback  )  [protected, virtual]
 

Performs rollback of actual transaction.

Implements Connection.

bool OracleConnection::_Savepoint const char *  name  )  [protected, virtual]
 

Creates savepoint with given name (name).

If your database doesn't support savepoints, feel free to make fake implementation of this function.

Implements Connection.

bool OracleConnection::_RollbackToSavepoint const char *  name  )  [protected, virtual]
 

Performs rollback to savepoint with given name (name).

If your database doesn't support savepoints, feel free to make fake implementation of this function.

Implements Connection.

bool OracleConnection::_NextOID long int &  nxtoid,
long int &  nxtsn
[protected, virtual]
 

Generates new OID and Serial Number for a new object.

Obsolete function used by POLiTe-style persistent classes. IopcPersistentObject ancestors don't use this function, so you can make fake implementation of this function if you don't need to support POLiTe-style persistent classes.

Parameters:
nxtoid Resulting OID.
nxtsn Resulting Serial Number

Implements Connection.

bool OracleConnection::_NextSN long int  curoid,
long int &  nxtsn
[protected, virtual]
 

Generates new Serial Number for object with given OID.

Obsolete function used by POLiTe-style persistent classes. IopcPersistentObject ancestors don't use this function, so you can make fake implementation of this function if you don't need to support POLiTe-style persistent classes.

Parameters:
curoid The OID.
nxtsn Resulting Serial Number

Implements Connection.

bool OracleConnection::Sql const char *  sqlCommand  )  [virtual]
 

Updates all objects in cache, then calls _Sql().

Parameters:
sqlCommand SQL statement to be processed

Reimplemented from Connection.

bool OracleConnection::Commit  )  [virtual]
 

Saves modified objects to the database, then commits actual transaction.

Reimplemented from Connection.

bool OracleConnection::Rollback  )  [virtual]
 

Performs rollback of actual transaction, then removes all persistent objects from the memory.

Reimplemented from Connection.

bool OracleConnection::Savepoint const char *  name  )  [virtual]
 

Saves modified objects to the database, then creates savepoint.

Parameters:
name Name of savepoint to be created.

Reimplemented from Connection.

bool OracleConnection::RollbackToSavepoint const char *  name  )  [virtual]
 

Performs rollback to savepoint, then destroys all data in memory.

Parameters:
name Name of savepoint to rollback to.

Reimplemented from Connection.

bool OracleConnection::Disconnect  )  [virtual]
 

Commits actual transaction, then disconnects from database.

Reimplemented from Connection.

bool OracleConnection::Abort  )  [virtual]
 

Performs rollback of actual transaction, then disconnect from database.

Reimplemented from Connection.

bool OracleConnection::Autocommit bool  ac  )  [virtual]
 

Turns on / off autocommit (automatic commit of every SQL data manipulation statement).

Parameters:
ac 1 to turn autocommit on, 0 to turn it off.

Implements Connection.

Cursor * OracleConnection::_GetNewCursor  )  [protected, virtual]
 

Creates and returns new cursor.

Implements Connection.


Member Data Documentation

Lda_Def OracleConnection::_LDA [protected]
 

ub1 OracleConnection::_HDA[HDA_SIZE] [protected]
 


The documentation for this class was generated from the following files:
Generated on Wed Aug 11 22:36:08 2004 for IOPC by Doxygen 1.3.6