#include <basicConnection.h>
Public Member Functions | |
virtual Cursor * | sql (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 Connection & | operator<< (const std::string &command) |
Shortcut for sqlNonQuery. | |
Database & | getDatabase () |
Returns the associated Database object. | |
Driver & | getDriver () |
Returns the database driver used. | |
ConnectionImpl * | getImplementation () |
Returns the driver-side part of the Connection implemenation. | |
Connection * | getBasicConnection () |
Returns the driver-independent part of the Connection implementation. |
virtual Cursor* iopc::BasicConnection::sql | ( | const std::string & | name | ) | [virtual] |
Sends an SQL statement (a query) to an associated database.
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] |
virtual void iopc::BasicConnection::rollbackToSavepoint | ( | const std::string & | name | ) | [virtual] |
Rolls back to the specified savepoint.
name | Name of the savepoint to which to roll back to. |
Implements iopc::Connection.
void iopc::BasicConnection::open | ( | ) | [virtual] |
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.
ac | - true - autocommit is enabled, false - autocommit is disabled |
Implements iopc::Connection.