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

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

Inheritance diagram for PostgreSqlMigrationWriter:
Collaboration diagram for PostgreSqlMigrationWriter:

Classes

struct  Sequence

Public Types

enum  State { IsReady, NeedsSetup, NotAvailable }
enum  HashVersion { Sha1, Sha2_512, Latest = Sha2_512 }
enum  MigrationObject {
  QuasselUser, Sender, Identity, IdentityNick,
  Network, Buffer, Backlog, IrcServer,
  UserSetting
}

Public Slots

virtual bool isAvailable () const
virtual QString displayName () const
virtual QString description () const
virtual QStringList setupKeys () const
virtual QVariantMap setupDefaults () const
virtual UserId addUser (const QString &user, const QString &password)
virtual bool updateUser (UserId user, const QString &password)
virtual void renameUser (UserId user, const QString &newName)
virtual UserId validateUser (const QString &user, const QString &password)
virtual UserId getUserId (const QString &username)
virtual UserId internalUser ()
virtual void delUser (UserId user)
virtual void setUserSetting (UserId userId, const QString &settingName, const QVariant &data)
virtual QVariant getUserSetting (UserId userId, const QString &settingName, const QVariant &defaultData=QVariant())
virtual IdentityId createIdentity (UserId user, CoreIdentity &identity)
virtual bool updateIdentity (UserId user, const CoreIdentity &identity)
virtual void removeIdentity (UserId user, IdentityId identityId)
virtual QList< CoreIdentityidentities (UserId user)
virtual NetworkId createNetwork (UserId user, const NetworkInfo &info)
virtual bool updateNetwork (UserId user, const NetworkInfo &info)
virtual bool removeNetwork (UserId user, const NetworkId &networkId)
virtual QList< NetworkInfonetworks (UserId user)
virtual QList< NetworkIdconnectedNetworks (UserId user)
virtual void setNetworkConnected (UserId user, const NetworkId &networkId, bool isConnected)
virtual QHash< QString, QString > persistentChannels (UserId user, const NetworkId &networkId)
virtual void setChannelPersistent (UserId user, const NetworkId &networkId, const QString &channel, bool isJoined)
virtual void setPersistentChannelKey (UserId user, const NetworkId &networkId, const QString &channel, const QString &key)
virtual QString awayMessage (UserId user, NetworkId networkId)
virtual void setAwayMessage (UserId user, NetworkId networkId, const QString &awayMsg)
virtual QString userModes (UserId user, NetworkId networkId)
virtual void setUserModes (UserId user, NetworkId networkId, const QString &userModes)
virtual BufferInfo bufferInfo (UserId user, const NetworkId &networkId, BufferInfo::Type type, const QString &buffer="", bool create=true)
virtual BufferInfo getBufferInfo (UserId user, const BufferId &bufferId)
virtual QList< BufferInforequestBuffers (UserId user)
virtual QList< BufferIdrequestBufferIdsForNetwork (UserId user, NetworkId networkId)
virtual bool removeBuffer (const UserId &user, const BufferId &bufferId)
virtual bool renameBuffer (const UserId &user, const BufferId &bufferId, const QString &newName)
virtual bool mergeBuffersPermanently (const UserId &user, const BufferId &bufferId1, const BufferId &bufferId2)
virtual void setBufferLastSeenMsg (UserId user, const BufferId &bufferId, const MsgId &msgId)
virtual QHash< BufferId, MsgIdbufferLastSeenMsgIds (UserId user)
virtual void setBufferMarkerLineMsg (UserId user, const BufferId &bufferId, const MsgId &msgId)
virtual QHash< BufferId, MsgIdbufferMarkerLineMsgIds (UserId user)
virtual bool logMessage (Message &msg)
virtual bool logMessages (MessageList &msgs)
virtual QList< MessagerequestMsgs (UserId user, BufferId bufferId, MsgId first=-1, MsgId last=-1, int limit=-1)
virtual QList< MessagerequestAllMsgs (UserId user, MsgId first=-1, MsgId last=-1, int limit=-1)
virtual State init (const QVariantMap &settings=QVariantMap())
virtual bool setup (const QVariantMap &settings=QVariantMap())

Signals

void bufferInfoUpdated (UserId user, const BufferInfo &)
 Sent when a new BufferInfo is created, or an existing one changed somehow.
void bufferRenamed (const QString &newName, const QString &oldName)
 Sent when a Buffer was renamed.
void userAdded (UserId, const QString &username)
 Sent when a new user has been added.
void userRenamed (UserId, const QString &newname)
 Sent when a user has been renamed.
void userRemoved (UserId)
 Sent when a user has been removed.

Public Member Functions

 PostgreSqlMigrationWriter ()
virtual bool writeMo (const QuasselUserMO &user)
virtual bool writeMo (const SenderMO &sender)
virtual bool writeMo (const IdentityMO &identity)
virtual bool writeMo (const IdentityNickMO &identityNick)
virtual bool writeMo (const NetworkMO &network)
virtual bool writeMo (const BufferMO &buffer)
virtual bool writeMo (const BacklogMO &backlog)
virtual bool writeMo (const IrcServerMO &ircserver)
virtual bool writeMo (const UserSettingMO &userSetting)
bool prepareQuery (MigrationObject mo)
virtual bool postProcess ()
virtual
AbstractSqlMigrationWriter
createMigrationWriter ()
virtual
AbstractSqlMigrationReader
createMigrationReader ()
bool migrateFrom (AbstractSqlMigrationReader *reader)

Static Public Member Functions

static QString migrationObject (MigrationObject moType)

Protected Member Functions

virtual bool transaction ()
virtual void rollback ()
virtual bool commit ()
virtual bool initDbSession (QSqlDatabase &db)
 Initialize db specific features on connect.
virtual void setConnectionProperties (const QVariantMap &properties)
virtual QString driverName ()
virtual QString hostName ()
virtual int port ()
virtual QString databaseName ()
virtual QString userName ()
virtual QString password ()
virtual int installedSchemaVersion ()
virtual bool updateSchemaVersion (int newVersion)
virtual bool setupSchemaVersion (int version)
void safeExec (QSqlQuery &query)
bool beginTransaction (QSqlDatabase &db)
bool beginReadOnlyTransaction (QSqlDatabase &db)
QSqlQuery executePreparedQuery (const QString &queryname, const QVariantList &params, QSqlDatabase &db)
QSqlQuery executePreparedQuery (const QString &queryname, const QVariant &param, QSqlDatabase &db)
void deallocateQuery (const QString &queryname, const QSqlDatabase &db)
void savePoint (const QString &handle, const QSqlDatabase &db)
void rollbackSavePoint (const QString &handle, const QSqlDatabase &db)
void releaseSavePoint (const QString &handle, const QSqlDatabase &db)
virtual void sync ()
 Makes temp data persistent.
QSqlDatabase logDb ()
QString queryString (const QString &queryName, int version)
QString queryString (const QString &queryName)
QStringList setupQueries ()
QStringList upgradeQueries (int ver)
bool upgradeDb ()
bool watchQuery (QSqlQuery &query)
int schemaVersion ()
QString hashPassword (const QString &password)
bool checkHashedPassword (const UserId user, const QString &password, const QString &hashedPassword, const Storage::HashVersion version)
void newQuery (const QString &query, QSqlDatabase db)
virtual void resetQuery ()
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 ()

Private Attributes

QSet< int > _validIdentities

Detailed Description

Definition at line 147 of file postgresqlstorage.h.

Member Enumeration Documentation

enum State
inherited
Enumerator:
IsReady 
NeedsSetup 
NotAvailable 

Definition at line 39 of file storage.h.

enum HashVersion
inherited
Enumerator:
Sha1 
Sha2_512 
Latest 

Definition at line 45 of file storage.h.

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 1794 of file postgresqlstorage.cpp.

Member Function Documentation

virtual bool transaction ( )
inlineprotectedvirtual

Implements AbstractSqlMigrator.

Definition at line 169 of file postgresqlstorage.h.

References AbstractSqlStorage::logDb().

virtual void rollback ( )
inlineprotectedvirtual

Implements AbstractSqlMigrator.

Definition at line 170 of file postgresqlstorage.h.

References AbstractSqlStorage::logDb().

virtual bool commit ( )
inlineprotectedvirtual

Implements AbstractSqlMigrator.

Definition at line 171 of file postgresqlstorage.h.

References AbstractSqlStorage::logDb().

bool isAvailable ( ) const
virtualslotinherited

Definition at line 55 of file postgresqlstorage.cpp.

QString displayName ( ) const
virtualslotinherited

Definition at line 63 of file postgresqlstorage.cpp.

QString description ( ) const
virtualslotinherited

Definition at line 69 of file postgresqlstorage.cpp.

QStringList setupKeys ( ) const
virtualslotinherited

Definition at line 76 of file postgresqlstorage.cpp.

QVariantMap setupDefaults ( ) const
virtualslotinherited

Definition at line 88 of file postgresqlstorage.cpp.

UserId addUser ( const QString &  user,
const QString &  password 
)
virtualslotinherited
bool updateUser ( UserId  user,
const QString &  password 
)
virtualslotinherited
void renameUser ( UserId  user,
const QString &  newName 
)
virtualslotinherited
UserId validateUser ( const QString &  user,
const QString &  password 
)
virtualslotinherited
UserId getUserId ( const QString &  username)
virtualslotinherited
void setUserSetting ( UserId  userId,
const QString &  settingName,
const QVariant &  data 
)
virtualslotinherited
QVariant getUserSetting ( UserId  userId,
const QString &  settingName,
const QVariant &  defaultData = QVariant() 
)
virtualslotinherited
void setNetworkConnected ( UserId  user,
const NetworkId networkId,
bool  isConnected 
)
virtualslotinherited
QHash< QString, QString > persistentChannels ( UserId  user,
const NetworkId networkId 
)
virtualslotinherited
void setChannelPersistent ( UserId  user,
const NetworkId networkId,
const QString &  channel,
bool  isJoined 
)
virtualslotinherited
void setPersistentChannelKey ( UserId  user,
const NetworkId networkId,
const QString &  channel,
const QString &  key 
)
virtualslotinherited
QString awayMessage ( UserId  user,
NetworkId  networkId 
)
virtualslotinherited
void setAwayMessage ( UserId  user,
NetworkId  networkId,
const QString &  awayMsg 
)
virtualslotinherited
QString userModes ( UserId  user,
NetworkId  networkId 
)
virtualslotinherited
void setUserModes ( UserId  user,
NetworkId  networkId,
const QString &  userModes 
)
virtualslotinherited
bool renameBuffer ( const UserId user,
const BufferId bufferId,
const QString &  newName 
)
virtualslotinherited
bool mergeBuffersPermanently ( const UserId user,
const BufferId bufferId1,
const BufferId bufferId2 
)
virtualslotinherited
void setBufferLastSeenMsg ( UserId  user,
const BufferId bufferId,
const MsgId msgId 
)
virtualslotinherited
void setBufferMarkerLineMsg ( UserId  user,
const BufferId bufferId,
const MsgId msgId 
)
virtualslotinherited
bool initDbSession ( QSqlDatabase &  )
protectedvirtualinherited

Initialize db specific features on connect.

This is called every time a connection to a specific SQL backend is established the default implementation does nothing.

When reimplementing this method, don't use logDB() inside this function as this would cause as we're just about to initialize that DB connection.

Reimplemented from AbstractSqlStorage.

Definition at line 99 of file postgresqlstorage.cpp.

void setConnectionProperties ( const QVariantMap &  properties)
protectedvirtualinherited
virtual QString driverName ( )
inlineprotectedvirtualinherited

Implements AbstractSqlStorage.

Definition at line 108 of file postgresqlstorage.h.

virtual QString hostName ( )
inlineprotectedvirtualinherited

Reimplemented from AbstractSqlStorage.

Definition at line 109 of file postgresqlstorage.h.

References PostgreSqlStorage::_hostName.

virtual int port ( )
inlineprotectedvirtualinherited

Reimplemented from AbstractSqlStorage.

Definition at line 110 of file postgresqlstorage.h.

References PostgreSqlStorage::_port.

virtual QString databaseName ( )
inlineprotectedvirtualinherited

Implements AbstractSqlStorage.

Definition at line 111 of file postgresqlstorage.h.

References PostgreSqlStorage::_databaseName.

virtual QString userName ( )
inlineprotectedvirtualinherited

Reimplemented from AbstractSqlStorage.

Definition at line 112 of file postgresqlstorage.h.

References PostgreSqlStorage::_userName.

virtual QString password ( )
inlineprotectedvirtualinherited

Reimplemented from AbstractSqlStorage.

Definition at line 113 of file postgresqlstorage.h.

References PostgreSqlStorage::_password.

Referenced by PostgreSqlStorage::validateUser().

int installedSchemaVersion ( )
protectedvirtualinherited
bool updateSchemaVersion ( int  newVersion)
protectedvirtualinherited
bool setupSchemaVersion ( int  version)
protectedvirtualinherited
void safeExec ( QSqlQuery &  query)
protectedinherited

Definition at line 1771 of file postgresqlstorage.cpp.

References AbstractSqlStorage::logDb().

Referenced by PostgreSqlStorage::addUser(), PostgreSqlStorage::awayMessage(), PostgreSqlStorage::bufferInfo(), PostgreSqlStorage::bufferLastSeenMsgIds(), PostgreSqlStorage::bufferMarkerLineMsgIds(), PostgreSqlStorage::connectedNetworks(), PostgreSqlStorage::createIdentity(), PostgreSqlStorage::createNetwork(), PostgreSqlStorage::delUser(), PostgreSqlStorage::getBufferInfo(), PostgreSqlStorage::getUserId(), PostgreSqlStorage::getUserSetting(), PostgreSqlStorage::identities(), PostgreSqlStorage::installedSchemaVersion(), PostgreSqlStorage::internalUser(), PostgreSqlStorage::mergeBuffersPermanently(), PostgreSqlStorage::networks(), PostgreSqlStorage::persistentChannels(), PostgreSqlStorage::removeBuffer(), PostgreSqlStorage::removeIdentity(), PostgreSqlStorage::removeNetwork(), PostgreSqlStorage::renameBuffer(), PostgreSqlStorage::renameUser(), PostgreSqlStorage::requestAllMsgs(), PostgreSqlStorage::requestBufferIdsForNetwork(), PostgreSqlStorage::requestBuffers(), PostgreSqlStorage::setAwayMessage(), PostgreSqlStorage::setBufferLastSeenMsg(), PostgreSqlStorage::setBufferMarkerLineMsg(), PostgreSqlStorage::setChannelPersistent(), PostgreSqlStorage::setNetworkConnected(), PostgreSqlStorage::setPersistentChannelKey(), PostgreSqlStorage::setupSchemaVersion(), PostgreSqlStorage::setUserModes(), PostgreSqlStorage::setUserSetting(), PostgreSqlStorage::updateIdentity(), PostgreSqlStorage::updateNetwork(), PostgreSqlStorage::updateSchemaVersion(), PostgreSqlStorage::updateUser(), PostgreSqlStorage::userModes(), and PostgreSqlStorage::validateUser().

QSqlQuery executePreparedQuery ( const QString &  queryname,
const QVariantList &  params,
QSqlDatabase &  db 
)
protectedinherited
QSqlQuery executePreparedQuery ( const QString &  queryname,
const QVariant &  param,
QSqlDatabase &  db 
)
protectedinherited
void deallocateQuery ( const QString &  queryname,
const QSqlDatabase &  db 
)
protectedinherited

Definition at line 1765 of file postgresqlstorage.cpp.

void savePoint ( const QString &  handle,
const QSqlDatabase &  db 
)
inlineprotectedinherited
void rollbackSavePoint ( const QString &  handle,
const QSqlDatabase &  db 
)
inlineprotectedinherited
void releaseSavePoint ( const QString &  handle,
const QSqlDatabase &  db 
)
inlineprotectedinherited
virtual AbstractSqlMigrationReader* createMigrationReader ( )
inlinevirtualinherited

Reimplemented in SqliteStorage.

Definition at line 41 of file abstractsqlstorage.h.

Referenced by Core::getMigrationReader().

virtual void sync ( )
inlineprotectedvirtualinherited

Makes temp data persistent.

This Method is periodically called by the Quassel Core to make temporary data persistant. This reduces the data loss drastically in the unlikely case of a Core crash.

Implements Storage.

Definition at line 49 of file abstractsqlstorage.h.

QSqlDatabase logDb ( )
protectedinherited

Definition at line 51 of file abstractsqlstorage.cpp.

References AbstractSqlStorage::_connectionPool, AbstractSqlStorage::addConnectionToPool(), AbstractSqlStorage::dbConnect(), and Storage::displayName().

Referenced by PostgreSqlStorage::addUser(), SqliteStorage::addUser(), PostgreSqlStorage::awayMessage(), SqliteStorage::awayMessage(), PostgreSqlStorage::beginReadOnlyTransaction(), PostgreSqlStorage::beginTransaction(), PostgreSqlStorage::bufferInfo(), SqliteStorage::bufferInfo(), PostgreSqlStorage::bufferLastSeenMsgIds(), SqliteStorage::bufferLastSeenMsgIds(), PostgreSqlStorage::bufferMarkerLineMsgIds(), SqliteStorage::bufferMarkerLineMsgIds(), SqliteMigrationReader::commit(), commit(), PostgreSqlStorage::connectedNetworks(), SqliteStorage::connectedNetworks(), PostgreSqlStorage::createIdentity(), SqliteStorage::createIdentity(), PostgreSqlStorage::createNetwork(), SqliteStorage::createNetwork(), PostgreSqlStorage::delUser(), SqliteStorage::delUser(), PostgreSqlStorage::getBufferInfo(), SqliteStorage::getBufferInfo(), PostgreSqlStorage::getUserId(), SqliteStorage::getUserId(), PostgreSqlStorage::getUserSetting(), SqliteStorage::getUserSetting(), PostgreSqlStorage::identities(), SqliteStorage::identities(), AbstractSqlStorage::init(), SqliteStorage::installedSchemaVersion(), PostgreSqlStorage::installedSchemaVersion(), PostgreSqlStorage::internalUser(), SqliteStorage::internalUser(), PostgreSqlStorage::logMessage(), SqliteStorage::logMessage(), PostgreSqlStorage::logMessages(), SqliteStorage::logMessages(), PostgreSqlStorage::mergeBuffersPermanently(), SqliteStorage::mergeBuffersPermanently(), PostgreSqlStorage::networks(), SqliteStorage::networks(), PostgreSqlStorage::persistentChannels(), SqliteStorage::persistentChannels(), postProcess(), PostgreSqlStorage::prepareAndExecuteQuery(), SqliteMigrationReader::prepareQuery(), prepareQuery(), PostgreSqlStorage::removeBuffer(), SqliteStorage::removeBuffer(), PostgreSqlStorage::removeIdentity(), SqliteStorage::removeIdentity(), PostgreSqlStorage::removeNetwork(), SqliteStorage::removeNetwork(), PostgreSqlStorage::renameBuffer(), SqliteStorage::renameBuffer(), PostgreSqlStorage::renameUser(), SqliteStorage::renameUser(), PostgreSqlStorage::requestAllMsgs(), SqliteStorage::requestAllMsgs(), PostgreSqlStorage::requestBufferIdsForNetwork(), SqliteStorage::requestBufferIdsForNetwork(), PostgreSqlStorage::requestBuffers(), SqliteStorage::requestBuffers(), PostgreSqlStorage::requestMsgs(), SqliteStorage::requestMsgs(), SqliteMigrationReader::rollback(), rollback(), PostgreSqlStorage::safeExec(), PostgreSqlStorage::setAwayMessage(), SqliteStorage::setAwayMessage(), PostgreSqlStorage::setBufferLastSeenMsg(), SqliteStorage::setBufferLastSeenMsg(), PostgreSqlStorage::setBufferMarkerLineMsg(), SqliteStorage::setBufferMarkerLineMsg(), PostgreSqlStorage::setChannelPersistent(), SqliteStorage::setChannelPersistent(), SqliteMigrationReader::setMaxId(), PostgreSqlStorage::setNetworkConnected(), SqliteStorage::setNetworkConnected(), PostgreSqlStorage::setPersistentChannelKey(), SqliteStorage::setPersistentChannelKey(), AbstractSqlStorage::setup(), SqliteStorage::setupSchemaVersion(), PostgreSqlStorage::setupSchemaVersion(), PostgreSqlStorage::setUserModes(), SqliteStorage::setUserModes(), PostgreSqlStorage::setUserSetting(), SqliteStorage::setUserSetting(), SqliteMigrationReader::transaction(), transaction(), PostgreSqlStorage::updateIdentity(), SqliteStorage::updateIdentity(), PostgreSqlStorage::updateNetwork(), SqliteStorage::updateNetwork(), SqliteStorage::updateSchemaVersion(), PostgreSqlStorage::updateSchemaVersion(), PostgreSqlStorage::updateUser(), SqliteStorage::updateUser(), AbstractSqlStorage::upgradeDb(), PostgreSqlStorage::userModes(), SqliteStorage::userModes(), PostgreSqlStorage::validateUser(), and SqliteStorage::validateUser().

QString queryString ( const QString &  queryName,
int  version 
)
protectedinherited

Definition at line 152 of file abstractsqlstorage.cpp.

References Storage::displayName(), and AbstractSqlStorage::schemaVersion().

Referenced by PostgreSqlStorage::addUser(), SqliteStorage::addUser(), PostgreSqlStorage::awayMessage(), SqliteStorage::awayMessage(), PostgreSqlStorage::bufferInfo(), SqliteStorage::bufferInfo(), PostgreSqlStorage::bufferLastSeenMsgIds(), SqliteStorage::bufferLastSeenMsgIds(), PostgreSqlStorage::bufferMarkerLineMsgIds(), SqliteStorage::bufferMarkerLineMsgIds(), PostgreSqlStorage::connectedNetworks(), SqliteStorage::connectedNetworks(), PostgreSqlStorage::createIdentity(), SqliteStorage::createIdentity(), PostgreSqlStorage::createNetwork(), SqliteStorage::createNetwork(), PostgreSqlStorage::delUser(), SqliteStorage::delUser(), PostgreSqlStorage::getBufferInfo(), SqliteStorage::getBufferInfo(), PostgreSqlStorage::getUserId(), SqliteStorage::getUserId(), PostgreSqlStorage::getUserSetting(), SqliteStorage::getUserSetting(), PostgreSqlStorage::identities(), SqliteStorage::identities(), PostgreSqlStorage::internalUser(), SqliteStorage::internalUser(), SqliteStorage::logMessage(), SqliteStorage::logMessages(), PostgreSqlStorage::mergeBuffersPermanently(), SqliteStorage::mergeBuffersPermanently(), PostgreSqlStorage::networks(), SqliteStorage::networks(), PostgreSqlStorage::persistentChannels(), SqliteStorage::persistentChannels(), PostgreSqlStorage::prepareAndExecuteQuery(), SqliteMigrationReader::prepareQuery(), prepareQuery(), PostgreSqlStorage::removeBuffer(), SqliteStorage::removeBuffer(), PostgreSqlStorage::removeIdentity(), SqliteStorage::removeIdentity(), PostgreSqlStorage::removeNetwork(), SqliteStorage::removeNetwork(), PostgreSqlStorage::renameBuffer(), SqliteStorage::renameBuffer(), PostgreSqlStorage::renameUser(), SqliteStorage::renameUser(), PostgreSqlStorage::requestAllMsgs(), SqliteStorage::requestAllMsgs(), PostgreSqlStorage::requestBufferIdsForNetwork(), SqliteStorage::requestBufferIdsForNetwork(), PostgreSqlStorage::requestBuffers(), SqliteStorage::requestBuffers(), SqliteStorage::requestMsgs(), PostgreSqlStorage::setAwayMessage(), SqliteStorage::setAwayMessage(), PostgreSqlStorage::setBufferLastSeenMsg(), SqliteStorage::setBufferLastSeenMsg(), PostgreSqlStorage::setBufferMarkerLineMsg(), SqliteStorage::setBufferMarkerLineMsg(), PostgreSqlStorage::setChannelPersistent(), SqliteStorage::setChannelPersistent(), SqliteMigrationReader::setMaxId(), PostgreSqlStorage::setNetworkConnected(), SqliteStorage::setNetworkConnected(), PostgreSqlStorage::setPersistentChannelKey(), SqliteStorage::setPersistentChannelKey(), AbstractSqlStorage::setup(), AbstractSqlStorage::setupQueries(), PostgreSqlStorage::setUserModes(), SqliteStorage::setUserModes(), PostgreSqlStorage::setUserSetting(), SqliteStorage::setUserSetting(), PostgreSqlStorage::updateIdentity(), SqliteStorage::updateIdentity(), PostgreSqlStorage::updateNetwork(), SqliteStorage::updateNetwork(), PostgreSqlStorage::updateUser(), SqliteStorage::updateUser(), AbstractSqlStorage::upgradeDb(), AbstractSqlStorage::upgradeQueries(), PostgreSqlStorage::userModes(), SqliteStorage::userModes(), PostgreSqlStorage::validateUser(), and SqliteStorage::validateUser().

QString queryString ( const QString &  queryName)
inlineprotectedinherited

Definition at line 54 of file abstractsqlstorage.h.

References AbstractSqlStorage::queryString().

Referenced by AbstractSqlStorage::queryString().

QStringList setupQueries ( )
protectedinherited
QStringList upgradeQueries ( int  ver)
protectedinherited
bool watchQuery ( QSqlQuery &  query)
protectedinherited

Definition at line 267 of file abstractsqlstorage.cpp.

References AbstractSqlStorage::_debug.

Referenced by PostgreSqlStorage::addUser(), PostgreSqlStorage::awayMessage(), SqliteStorage::awayMessage(), PostgreSqlStorage::bufferInfo(), SqliteStorage::bufferInfo(), PostgreSqlStorage::bufferLastSeenMsgIds(), SqliteStorage::bufferLastSeenMsgIds(), PostgreSqlStorage::bufferMarkerLineMsgIds(), SqliteStorage::bufferMarkerLineMsgIds(), PostgreSqlStorage::connectedNetworks(), SqliteStorage::connectedNetworks(), PostgreSqlStorage::createIdentity(), SqliteStorage::createIdentity(), PostgreSqlStorage::createNetwork(), SqliteStorage::createNetwork(), PostgreSqlStorage::delUser(), PostgreSqlStorage::getBufferInfo(), SqliteStorage::getBufferInfo(), PostgreSqlStorage::getUserId(), PostgreSqlStorage::getUserSetting(), PostgreSqlStorage::identities(), SqliteStorage::identities(), PostgreSqlStorage::installedSchemaVersion(), PostgreSqlStorage::internalUser(), PostgreSqlStorage::logMessage(), SqliteStorage::logMessage(), PostgreSqlStorage::logMessages(), SqliteStorage::logMessages(), PostgreSqlStorage::mergeBuffersPermanently(), SqliteStorage::mergeBuffersPermanently(), PostgreSqlStorage::networks(), SqliteStorage::networks(), PostgreSqlStorage::persistentChannels(), SqliteStorage::persistentChannels(), PostgreSqlStorage::removeBuffer(), SqliteStorage::removeBuffer(), PostgreSqlStorage::removeIdentity(), PostgreSqlStorage::removeNetwork(), SqliteStorage::removeNetwork(), PostgreSqlStorage::renameBuffer(), SqliteStorage::renameBuffer(), PostgreSqlStorage::renameUser(), PostgreSqlStorage::requestAllMsgs(), SqliteStorage::requestAllMsgs(), PostgreSqlStorage::requestBufferIdsForNetwork(), SqliteStorage::requestBufferIdsForNetwork(), PostgreSqlStorage::requestBuffers(), SqliteStorage::requestBuffers(), PostgreSqlStorage::requestMsgs(), SqliteStorage::requestMsgs(), PostgreSqlStorage::setAwayMessage(), SqliteStorage::setAwayMessage(), PostgreSqlStorage::setBufferLastSeenMsg(), SqliteStorage::setBufferLastSeenMsg(), PostgreSqlStorage::setBufferMarkerLineMsg(), SqliteStorage::setBufferMarkerLineMsg(), PostgreSqlStorage::setChannelPersistent(), SqliteStorage::setChannelPersistent(), PostgreSqlStorage::setNetworkConnected(), SqliteStorage::setNetworkConnected(), PostgreSqlStorage::setPersistentChannelKey(), SqliteStorage::setPersistentChannelKey(), AbstractSqlStorage::setup(), PostgreSqlStorage::setupSchemaVersion(), PostgreSqlStorage::setUserModes(), SqliteStorage::setUserModes(), PostgreSqlStorage::setUserSetting(), PostgreSqlStorage::updateIdentity(), SqliteStorage::updateIdentity(), PostgreSqlStorage::updateNetwork(), SqliteStorage::updateNetwork(), PostgreSqlStorage::updateSchemaVersion(), PostgreSqlStorage::updateUser(), AbstractSqlStorage::upgradeDb(), PostgreSqlStorage::userModes(), SqliteStorage::userModes(), and PostgreSqlStorage::validateUser().

void bufferInfoUpdated ( UserId  user,
const BufferInfo  
)
signalinherited

Sent when a new BufferInfo is created, or an existing one changed somehow.

void bufferRenamed ( const QString &  newName,
const QString &  oldName 
)
signalinherited

Sent when a Buffer was renamed.

void userAdded ( UserId  ,
const QString &  username 
)
signalinherited

Sent when a new user has been added.

Referenced by PostgreSqlStorage::addUser(), and SqliteStorage::addUser().

void userRenamed ( UserId  ,
const QString &  newname 
)
signalinherited

Sent when a user has been renamed.

Referenced by PostgreSqlStorage::renameUser(), and SqliteStorage::renameUser().

void userRemoved ( UserId  )
signalinherited

Sent when a user has been removed.

Referenced by PostgreSqlStorage::delUser(), and SqliteStorage::delUser().

QString hashPassword ( const QString &  password)
protectedinherited
bool checkHashedPassword ( const UserId  user,
const QString &  password,
const QString &  hashedPassword,
const Storage::HashVersion  version 
)
protectedinherited
bool migrateFrom ( AbstractSqlMigrationReader reader)
inlineinherited

Definition at line 328 of file abstractsqlstorage.h.

References AbstractSqlMigrationReader::migrateTo().

void newQuery ( const QString &  query,
QSqlDatabase  db 
)
protectedinherited
void resetQuery ( )
protectedvirtualinherited
bool exec ( )
protectedinherited
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
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().

Member Data Documentation

QSet<int> _validIdentities
private

Definition at line 181 of file postgresqlstorage.h.

Referenced by prepareQuery(), and writeMo().


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