iopc::BasicConnection Class Reference
[iopcdb]

The driver-independent part of the Connection implementation. More...

#include <basicConnection.h>

Inheritance diagram for iopc::BasicConnection:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual Cursorsql (const std::string &name)
 Sends an SQL statement (a query) to an associated database.
virtual void returnCursor (Cursor *cur)
 Cursors that are no longer needed should be returned to the driver Connection object using this method.
virtual void closeAllCursors ()
 Closes and returns all cursors on this connection.
virtual void sqlNonQuery (const std::string &name)
 Executes an SQL statement that does not return any rows (DDL, DML).
virtual void commit ()
 Commits current transaction. Starts new one.
virtual void rollback ()
 Rolls back current transaction.
virtual void savepoint (const std::string &name)
 Creates a savepoint.
virtual void rollbackToSavepoint (const std::string &name)
 Rolls back to the specified savepoint.
virtual void open ()
 Opens the connection.
virtual void close ()
 Closes the connection.
virtual void disconnect ()
 Commits last transaction and closes the connection.
virtual void abort ()
 Rolls back current transaction and closes the connection.
virtual void setAutoCommit (bool ac)
 Turns autocommit on this connection on or off.
virtual bool isOpened ()
 Determines whether this connection is opened or not.
virtual Connectionoperator<< (const std::string &command)
 Shortcut for sqlNonQuery.
DatabasegetDatabase ()
 Returns the associated Database object.
DrivergetDriver ()
 Returns the database driver used.
ConnectionImplgetImplementation ()
 Returns the driver-side part of the Connection implemenation.
ConnectiongetBasicConnection ()
 Returns the driver-independent part of the Connection implementation.


Detailed Description

The driver-independent part of the Connection implementation.

Member Function Documentation

virtual Cursor* iopc::BasicConnection::sql ( const std::string &  name  )  [virtual]

Sends an SQL statement (a query) to an associated database.

Returns:
A Cursor object representing the result set of the SQL command

Implements iopc::Connection.

void iopc::BasicConnection::returnCursor ( Cursor cur  )  [virtual]

Cursors that are no longer needed should be returned to the driver Connection object using this method.

All resources allocated by the Cursor are released.

Implements iopc::Connection.

void iopc::BasicConnection::sqlNonQuery ( const std::string &  name  )  [virtual]

Executes an SQL statement that does not return any rows (DDL, DML).

No Cursor object is created

Implements iopc::Connection.

virtual void iopc::BasicConnection::savepoint ( const std::string &  name  )  [virtual]

Creates a savepoint.

Parameters:
name Savepoint name

Implements iopc::Connection.

virtual void iopc::BasicConnection::rollbackToSavepoint ( const std::string &  name  )  [virtual]

Rolls back to the specified savepoint.

Parameters:
name Name of the savepoint to which to roll back to.

Implements iopc::Connection.

void iopc::BasicConnection::open (  )  [virtual]

Opens the connection.

This call opens a physical link to the DBMS

Implements iopc::Connection.

void iopc::BasicConnection::close (  )  [virtual]

Closes the connection.

This call should close the physical link to the DBMS

Implements iopc::Connection.

void iopc::BasicConnection::disconnect (  )  [virtual]

Commits last transaction and closes the connection.

The connection still needs to be returned to associated Database object

Implements iopc::Connection.

void iopc::BasicConnection::setAutoCommit ( bool  ac  )  [virtual]

Turns autocommit on this connection on or off.

Parameters:
ac - true - autocommit is enabled, false - autocommit is disabled

Implements iopc::Connection.


The documentation for this class was generated from the following files:

Generated on Tue Apr 14 16:46:38 2009 for IOPC 2 by  doxygen 1.5.6