AbsSqlConnection Class Reference

Represents a database connection to sql engine. More...

Inherited by SqlConnection, SqlGwConnection, SqlLogConnection, and SqlOdbcConnection.


Public Member Functions

virtual DbRetVal connect (char *user, char *pass)=0
 opens connection to the sql engine
virtual DbRetVal disconnect ()=0
 closes connection to the sql engine and releases all the resources
virtual DbRetVal commit ()=0
 Commits active transaction.
virtual DbRetVal rollback ()=0
 Aborts the active transaction.
virtual DbRetVal beginTrans (IsolationLevel isoLevel=READ_COMMITTED, TransSyncMode mode=OSYNC)=0
 Starts a new transaction.


Detailed Description

Represents a database connection to sql engine.

It represents the database connection to the sql engine.
All database operations shall be done within the context of the connection.
Application should first create object of this class to accessing the database
through SQL Engine. Each connection has only one active transaction at any given point of time, all
operations which happen using this connection object will be done as part of that
transaction.

Note:
SERIALIZABLE isolation level is not supported.


Member Function Documentation

virtual DbRetVal AbsSqlConnection::beginTrans ( IsolationLevel  isoLevel = READ_COMMITTED,
TransSyncMode  mode = OSYNC 
) [pure virtual]

Starts a new transaction.


The previous transaction should be either committed or rollback
before beginTrans is called.
Applications are required to start transaction before they attempt any
database operation.

Parameters:
isoLevel isolation level. Default is read committed.
Returns:
DbRetVal

virtual DbRetVal AbsSqlConnection::commit (  )  [pure virtual]

Commits active transaction.


It makes all the changes made in the current transaction permanent and
it also releases the locks held by the current transaction.
After a transaction commits, application is required to start another
transaction for further database operations.

Returns:
DbRetVal

virtual DbRetVal AbsSqlConnection::connect ( char *  user,
char *  pass 
) [pure virtual]

opens connection to the sql engine

Parameters:
user username for authentication
pass password for authentication
Returns:
DbRetVal

virtual DbRetVal AbsSqlConnection::disconnect (  )  [pure virtual]

closes connection to the sql engine and releases all the resources

Returns:
DbRetVal

virtual DbRetVal AbsSqlConnection::rollback (  )  [pure virtual]

Aborts the active transaction.


undo all the changes made in the current transaction and it also
releases the locks held by the current transaction.
After a transaction rollback, application is required to start another
transaction for further database operations.

Returns:
DbRetVal


The documentation for this class was generated from the following file:
CSQL Project Page