LibEngsas
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
ESqlDatabase Class Reference

An improved QSqlDatabase class. More...

#include <esqldatabase.h>

+ Inheritance diagram for ESqlDatabase:
+ Collaboration diagram for ESqlDatabase:

Public Member Functions

 ESqlDatabase ()
 
 ESqlDatabase (const QSqlDatabase &other)
 
 ESqlDatabase (const QString &useType)
 
 ~ESqlDatabase ()
 
bool loadAndCheckSettings (QString username, QString host, QString dbName, QString newType, QString passwd)
 
void setType (QString name)
 
QString type ()
 
QStringList tables (QSql::TableType type=QSql::Tables) const
 

Static Public Member Functions

static bool checkSettings ()
 
static ESqlDatabase database (QString connectionName=QLatin1String(defaultConnection))
 

Private Member Functions

QStringList tableList () const
 
QStringList systemTableList () const
 
QStringList viewList () const
 
QStringList allList () const
 
void init ()
 

Private Attributes

QString myType
 
KWallet::Wallet * wallet
 

Detailed Description

An improved QSqlDatabase class.

Constructor & Destructor Documentation

◆ ESqlDatabase() [1/3]

ESqlDatabase::ESqlDatabase ( )
+ Here is the call graph for this function:

◆ ESqlDatabase() [2/3]

ESqlDatabase::ESqlDatabase ( const QSqlDatabase &  other)
+ Here is the call graph for this function:

◆ ESqlDatabase() [3/3]

ESqlDatabase::ESqlDatabase ( const QString &  useType)

◆ ~ESqlDatabase()

ESqlDatabase::~ESqlDatabase ( )

Member Function Documentation

◆ allList()

QStringList ESqlDatabase::allList ( ) const
private
Returns
a combined list of all three other lists
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkSettings()

bool ESqlDatabase::checkSettings ( )
static

◆ database()

ESqlDatabase ESqlDatabase::database ( QString  connectionName = QLatin1String( defaultConnection ))
static

should be used thorughout the whole project, because the orignal database function opens the connection automatically, therefore bool closeDB = !db.isOpen() isn't working and transactions through more than one database() does not work too!

+ Here is the caller graph for this function:

◆ init()

void ESqlDatabase::init ( )
private
+ Here is the caller graph for this function:

◆ loadAndCheckSettings()

bool ESqlDatabase::loadAndCheckSettings ( QString  username,
QString  host,
QString  dbName,
QString  newType,
QString  passwd 
)
+ Here is the call graph for this function:

◆ setType()

void ESqlDatabase::setType ( QString  name)
+ Here is the caller graph for this function:

◆ systemTableList()

QStringList ESqlDatabase::systemTableList ( ) const
private

right now only default implementation will be called

Todo:
must be implemented
+ Here is the caller graph for this function:

◆ tableList()

QStringList ESqlDatabase::tableList ( ) const
private
Returns
List of table names inside selected database (
See also
databaseName )
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tables()

QStringList ESqlDatabase::tables ( QSql::TableType  type = QSql::Tables) const
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ type()

QString ESqlDatabase::type ( )
+ Here is the caller graph for this function:

◆ viewList()

QStringList ESqlDatabase::viewList ( ) const
private
Returns
List of view names inside selected database (
See also
databaseName )
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ myType

QString ESqlDatabase::myType
private

◆ wallet

KWallet::Wallet* ESqlDatabase::wallet
private

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