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

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

Inheritance diagram for AbstractSqlMigrationReader:
Collaboration diagram for AbstractSqlMigrationReader:

Public Types

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

Public Member Functions

 AbstractSqlMigrationReader ()
virtual bool readMo (QuasselUserMO &user)=0
virtual bool readMo (IdentityMO &identity)=0
virtual bool readMo (IdentityNickMO &identityNick)=0
virtual bool readMo (NetworkMO &network)=0
virtual bool readMo (BufferMO &buffer)=0
virtual bool readMo (SenderMO &sender)=0
virtual bool readMo (BacklogMO &backlog)=0
virtual bool readMo (IrcServerMO &ircserver)=0
virtual bool readMo (UserSettingMO &userSetting)=0
bool migrateTo (AbstractSqlMigrationWriter *writer)

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 Member Functions

void abortMigration (const QString &errorMsg=QString())
bool finalizeMigration ()
template<typename T >
bool transferMo (MigrationObject moType, T &mo)

Private Attributes

AbstractSqlMigrationWriter_writer

Detailed Description

Definition at line 288 of file abstractsqlstorage.h.

Member Enumeration Documentation

enum MigrationObject
inherited
Enumerator:
QuasselUser 
Sender 
Identity 
IdentityNick 
Network 
Buffer 
Backlog 
IrcServer 
UserSetting 

Definition at line 247 of file abstractsqlstorage.h.

Constructor & Destructor Documentation

Definition at line 434 of file abstractsqlstorage.cpp.

Member Function Documentation

virtual bool readMo ( QuasselUserMO user)
pure virtual

Implemented in SqliteMigrationReader.

Referenced by transferMo().

virtual bool readMo ( IdentityMO identity)
pure virtual

Implemented in SqliteMigrationReader.

virtual bool readMo ( IdentityNickMO identityNick)
pure virtual

Implemented in SqliteMigrationReader.

virtual bool readMo ( NetworkMO network)
pure virtual

Implemented in SqliteMigrationReader.

virtual bool readMo ( BufferMO buffer)
pure virtual

Implemented in SqliteMigrationReader.

virtual bool readMo ( SenderMO sender)
pure virtual

Implemented in SqliteMigrationReader.

virtual bool readMo ( BacklogMO backlog)
pure virtual

Implemented in SqliteMigrationReader.

virtual bool readMo ( IrcServerMO ircserver)
pure virtual

Implemented in SqliteMigrationReader.

virtual bool readMo ( UserSettingMO userSetting)
pure virtual

Implemented in SqliteMigrationReader.

void abortMigration ( const QString &  errorMsg = QString())
private
bool finalizeMigration ( )
private
void newQuery ( const QString &  query,
QSqlDatabase  db 
)
protectedinherited
void resetQuery ( )
protectedvirtualinherited
virtual bool prepareQuery ( MigrationObject  mo)
protectedpure virtualinherited

Implemented in PostgreSqlMigrationWriter, and SqliteMigrationReader.

Referenced by transferMo().

bool next ( )
inlineprotectedinherited

Definition at line 269 of file abstractsqlstorage.h.

References AbstractSqlMigrator::_query.

Referenced by SqliteMigrationReader::readMo().

QVariant value ( int  index)
inlineprotectedinherited

Definition at line 270 of file abstractsqlstorage.h.

References AbstractSqlMigrator::_query.

Referenced by SqliteMigrationReader::readMo().

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

Definition at line 272 of file abstractsqlstorage.h.

References AbstractSqlMigrator::_query.

QSqlError lastError ( )
inlineprotectedinherited

Definition at line 274 of file abstractsqlstorage.h.

References AbstractSqlMigrator::_query.

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

void dumpStatus ( )
protectedinherited
QString executedQuery ( )
inlineprotectedinherited

Definition at line 276 of file abstractsqlstorage.h.

References AbstractSqlMigrator::_query.

Referenced by AbstractSqlMigrator::dumpStatus().

QVariantList boundValues ( )
inlineprotectedinherited

Definition at line 404 of file abstractsqlstorage.cpp.

References AbstractSqlMigrator::_query.

Referenced by AbstractSqlMigrator::dumpStatus().

virtual bool transaction ( )
protectedpure virtualinherited

Implemented in PostgreSqlMigrationWriter, and SqliteMigrationReader.

Referenced by migrateTo().

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

Member Data Documentation

AbstractSqlMigrationWriter* _writer
private

Definition at line 311 of file abstractsqlstorage.h.

Referenced by abortMigration(), finalizeMigration(), migrateTo(), and transferMo().


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