Quassel IRC  Pre-Release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
AbstractSqlMigrator Class Reference

#include </tmp/quassel/src/core/abstractsqlstorage.h>

Inheritance diagram for AbstractSqlMigrator:

Classes

struct  BacklogMO
struct  BufferMO
struct  IdentityMO
struct  IdentityNickMO
struct  IrcServerMO
struct  NetworkMO
struct  QuasselUserMO
struct  SenderMO
struct  UserSettingMO

Public Types

enum  MigrationObject {
  QuasselUser, Sender, Identity, IdentityNick,
  Network, Buffer, Backlog, IrcServer,
  UserSetting
}

Public Member Functions

 AbstractSqlMigrator ()
virtual ~AbstractSqlMigrator ()

Static Public Member Functions

static QString migrationObject (MigrationObject moType)

Protected Member Functions

void newQuery (const QString &query, QSqlDatabase db)
virtual void resetQuery ()
virtual bool prepareQuery (MigrationObject mo)=0
bool exec ()
bool next ()
QVariant value (int index)
void bindValue (const QString &placeholder, const QVariant &val)
void bindValue (int pos, const QVariant &val)
QSqlError lastError ()
void dumpStatus ()
QString executedQuery ()
QVariantList boundValues ()
virtual bool transaction ()=0
virtual void rollback ()=0
virtual bool commit ()=0

Private Attributes

QSqlQuery * _query

Detailed Description

Definition at line 126 of file abstractsqlstorage.h.

Member Enumeration Documentation

Enumerator:
QuasselUser 
Sender 
Identity 
IdentityNick 
Network 
Buffer 
Backlog 
IrcServer 
UserSetting 

Definition at line 247 of file abstractsqlstorage.h.

Constructor & Destructor Documentation

Definition at line 349 of file abstractsqlstorage.cpp.

virtual ~AbstractSqlMigrator ( )
inlinevirtual

Definition at line 260 of file abstractsqlstorage.h.

Member Function Documentation

QString migrationObject ( MigrationObject  moType)
static
void newQuery ( const QString &  query,
QSqlDatabase  db 
)
protected
virtual bool prepareQuery ( MigrationObject  mo)
protectedpure virtual
bool next ( )
inlineprotected

Definition at line 269 of file abstractsqlstorage.h.

References _query.

Referenced by SqliteMigrationReader::readMo().

QVariant value ( int  index)
inlineprotected

Definition at line 270 of file abstractsqlstorage.h.

References _query.

Referenced by SqliteMigrationReader::readMo().

void bindValue ( const QString &  placeholder,
const QVariant &  val 
)
inlineprotected
void bindValue ( int  pos,
const QVariant &  val 
)
inlineprotected

Definition at line 272 of file abstractsqlstorage.h.

References _query.

QSqlError lastError ( )
inlineprotected

Definition at line 274 of file abstractsqlstorage.h.

References _query.

Referenced by AbstractSqlMigrationReader::abortMigration(), and dumpStatus().

void dumpStatus ( )
protected
QString executedQuery ( )
inlineprotected

Definition at line 276 of file abstractsqlstorage.h.

References _query.

Referenced by dumpStatus().

QVariantList boundValues ( )
inlineprotected

Definition at line 404 of file abstractsqlstorage.cpp.

References _query.

Referenced by dumpStatus().

virtual bool transaction ( )
protectedpure virtual
virtual void rollback ( )
protectedpure virtual
virtual bool commit ( )
protectedpure virtual

Member Data Documentation

QSqlQuery* _query
private

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