iopc::BasicDatabase Class Reference
[iopcdb]

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

#include <basicDatabase.h>

Inheritance diagram for iopc::BasicDatabase:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void commit ()
 Commits transactions on all connections.
virtual void rollback ()
 Rolls back transactions on all connections.
virtual ConnectiongetConnection (const std::string &connStr)
 Creates a new connection to this database.
virtual void returnConnection (Connection *connection)
 Releases the connection created with Database::getConnection().
virtual void disconnect ()
 Commits all connections on the database, then disconnects them from database.
DatabaseImplgetImplementation ()
 Returns the driver-side part of the Database implemenation.
DrivergetDriver ()
 Returns a reference to a Driver associated with this database.
virtual DatabasegetBasicDatabase ()
 Returns the driver-independent part of the Database implementation.


Detailed Description

The driver-independent part of the Database implementation.

Member Function Documentation

virtual Connection* iopc::BasicDatabase::getConnection ( const std::string &  connStr  )  [virtual]

Creates a new connection to this database.

Connection must be opened by calling Connection::open() before executing any SQL commands.

Parameters:
connStr A connection string. Its format is defined by the database driver. Usually it identifies the database user/schema.
Returns:
The Connection object representing the requested connection.
See also:
Connection

Implements iopc::Database.

void iopc::BasicDatabase::returnConnection ( Connection connection  )  [virtual]

Releases the connection created with Database::getConnection().

Any connection that was created using Database::getConnection() must be passed to this method when no longer needed.

Parameters:
connection The connection to be released

Implements iopc::Database.

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

Commits all connections on the database, then disconnects them from database.

The connections are removed from the connection set. (No returnConnection() is needed)

Implements iopc::Database.


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