#include <databaseImpl.h>
Public Member Functions | |
virtual ConnectionImpl * | getConnection (const std::string &connStr)=0 |
This method is invoked when user requests a new database connection by calling Database::getConnection(). | |
virtual void | returnConnection (ConnectionImpl *conn)=0 |
Connections that are no longer needed are returned to the driver using this method. |
Each database driver must provide a class that implements this interface
Instances of this class are obtained from the driver using Driver::getDatabaseImpl() method and are returned using the Driver::returnDatabaseImpl() method.
virtual ConnectionImpl* iopc::DatabaseImpl::getConnection | ( | const std::string & | connStr | ) | [pure virtual] |
This method is invoked when user requests a new database connection by calling Database::getConnection().
The implementation should create and return a new ConnectionImpl object.
connStr | A connection string. Its format is defined by the database driver. Usually it identifies the database user/schema. |
virtual void iopc::DatabaseImpl::returnConnection | ( | ConnectionImpl * | conn | ) | [pure virtual] |
Connections that are no longer needed are returned to the driver using this method.
Database driver should release all allocated resources associated with the connection. This method is invoked from Database::returnConnection()
conn | Implementation of the connection. |