TreeFrogFramework  1.18
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TDatabaseContext Class Reference

#include <tdatabasecontext.h>

Inheritance diagram for TDatabaseContext:
Inheritance graph
[legend]

Public Member Functions

 TDatabaseContext ()
 
virtual ~TDatabaseContext ()
 
QSqlDatabase & getSqlDatabase (int id)
 
TKvsDatabase & getKvsDatabase (TKvsDatabase::Type type)
 
void setTransactionEnabled (bool enable)
 
void release ()
 
bool beginTransaction (QSqlDatabase &database)
 
void commitTransactions ()
 
void rollbackTransactions ()
 
int idleTime () const
 

Protected Member Functions

void releaseKvsDatabases ()
 
void releaseSqlDatabases ()
 

Protected Attributes

QMap< int, QSqlDatabase > sqlDatabases
 
QMap< int, TKvsDatabase > kvsDatabases
 

Detailed Description

The TDatabaseContext class is the base class of contexts for database access.

Constructor & Destructor Documentation

TDatabaseContext::TDatabaseContext ( )
TDatabaseContext::~TDatabaseContext ( )
virtual

Member Function Documentation

bool TDatabaseContext::beginTransaction ( QSqlDatabase &  database)
void TDatabaseContext::commitTransactions ( )
TKvsDatabase & TDatabaseContext::getKvsDatabase ( TKvsDatabase::Type  type)
QSqlDatabase & TDatabaseContext::getSqlDatabase ( int  id)
int TDatabaseContext::idleTime ( ) const
void TDatabaseContext::release ( )
void TDatabaseContext::releaseKvsDatabases ( )
protected
void TDatabaseContext::releaseSqlDatabases ( )
protected
void TDatabaseContext::rollbackTransactions ( )
void TDatabaseContext::setTransactionEnabled ( bool  enable)

Member Data Documentation

QMap<int, TKvsDatabase> TDatabaseContext::kvsDatabases
protected
QMap<int, QSqlDatabase> TDatabaseContext::sqlDatabases
protected

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