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

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

Inheritance diagram for SqliteMigrationReader:
Collaboration diagram for SqliteMigrationReader:

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

bool isAvailable () const
QString displayName () const
virtual QStringList setupKeys () const
virtual QVariantMap setupDefaults () const
QString description () 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

 SqliteMigrationReader ()
virtual bool readMo (QuasselUserMO &user)
virtual bool readMo (SenderMO &sender)
virtual bool readMo (IdentityMO &identity)
virtual bool readMo (IdentityNickMO &identityNick)
virtual bool readMo (NetworkMO &network)
virtual bool readMo (BufferMO &buffer)
virtual bool readMo (BacklogMO &backlog)
virtual bool readMo (IrcServerMO &ircserver)
virtual bool readMo (UserSettingMO &userSetting)
virtual bool prepareQuery (MigrationObject mo)
int stepSize ()
virtual
AbstractSqlMigrationReader
createMigrationReader ()
virtual
AbstractSqlMigrationWriter
createMigrationWriter ()
bool migrateTo (AbstractSqlMigrationWriter *writer)

Static Public Member Functions

static QString migrationObject (MigrationObject moType)

Protected Member Functions

virtual bool transaction ()
virtual void rollback ()
virtual bool commit ()
virtual void setConnectionProperties (const QVariantMap &)
virtual QString driverName ()
virtual QString databaseName ()
virtual int installedSchemaVersion ()
virtual bool updateSchemaVersion (int newVersion)
virtual bool setupSchemaVersion (int version)
bool safeExec (QSqlQuery &query, int retryCount=0)
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 ()
virtual QString hostName ()
virtual int port ()
virtual QString userName ()
virtual QString password ()
virtual bool initDbSession (QSqlDatabase &)
 Initialize db specific features on connect.
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 Member Functions

void setMaxId (MigrationObject mo)

Private Attributes

int _maxId

Detailed Description

Definition at line 131 of file sqlitestorage.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 1735 of file sqlitestorage.cpp.

Member Function Documentation

int stepSize ( )
inline

Definition at line 150 of file sqlitestorage.h.

Referenced by prepareQuery(), and readMo().

virtual bool transaction ( )
inlineprotectedvirtual

Implements AbstractSqlMigrator.

Definition at line 153 of file sqlitestorage.h.

References AbstractSqlStorage::logDb().

virtual void rollback ( )
inlineprotectedvirtual

Implements AbstractSqlMigrator.

Definition at line 154 of file sqlitestorage.h.

References AbstractSqlStorage::logDb().

virtual bool commit ( )
inlineprotectedvirtual

Implements AbstractSqlMigrator.

Definition at line 155 of file sqlitestorage.h.

References AbstractSqlStorage::logDb().

AbstractSqlMigrationReader * createMigrationReader ( )
inlinevirtualinherited

Reimplemented from AbstractSqlStorage.

Definition at line 163 of file sqlitestorage.h.

bool isAvailable ( ) const
slotinherited

Definition at line 42 of file sqlitestorage.cpp.

QString displayName ( ) const
slotinherited

Definition at line 49 of file sqlitestorage.cpp.

virtual QStringList setupKeys ( ) const
inlinevirtualslotinherited

Definition at line 45 of file sqlitestorage.h.

virtual QVariantMap setupDefaults ( ) const
inlinevirtualslotinherited

Definition at line 46 of file sqlitestorage.h.

QString description ( ) const
slotinherited

Definition at line 58 of file sqlitestorage.cpp.

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 removeIdentity ( UserId  user,
IdentityId  identityId 
)
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
void setAwayMessage ( UserId  user,
NetworkId  networkId,
const QString &  awayMsg 
)
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
virtual void setConnectionProperties ( const QVariantMap &  )
inlineprotectedvirtualinherited

Implements AbstractSqlStorage.

Definition at line 107 of file sqlitestorage.h.

virtual QString driverName ( )
inlineprotectedvirtualinherited

Implements AbstractSqlStorage.

Definition at line 108 of file sqlitestorage.h.

virtual QString databaseName ( )
inlineprotectedvirtualinherited

Implements AbstractSqlStorage.

Definition at line 109 of file sqlitestorage.h.

References SqliteStorage::backlogFile().

int installedSchemaVersion ( )
protectedvirtualinherited

Reimplemented from AbstractSqlStorage.

Definition at line 66 of file sqlitestorage.cpp.

References AbstractSqlStorage::logDb().

bool updateSchemaVersion ( int  newVersion)
protectedvirtualinherited

Implements AbstractSqlStorage.

Definition at line 83 of file sqlitestorage.cpp.

References AbstractSqlStorage::logDb().

bool setupSchemaVersion ( int  version)
protectedvirtualinherited

Implements AbstractSqlStorage.

Definition at line 101 of file sqlitestorage.cpp.

References AbstractSqlStorage::logDb().

bool safeExec ( QSqlQuery &  query,
int  retryCount = 0 
)
protectedinherited
virtual AbstractSqlMigrationWriter* createMigrationWriter ( )
inlinevirtualinherited

Reimplemented in PostgreSqlStorage.

Definition at line 42 of file abstractsqlstorage.h.

Referenced by Core::getMigrationWriter().

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(), commit(), PostgreSqlMigrationWriter::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(), PostgreSqlMigrationWriter::postProcess(), PostgreSqlStorage::prepareAndExecuteQuery(), prepareQuery(), PostgreSqlMigrationWriter::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(), rollback(), PostgreSqlMigrationWriter::rollback(), PostgreSqlStorage::safeExec(), PostgreSqlStorage::setAwayMessage(), SqliteStorage::setAwayMessage(), PostgreSqlStorage::setBufferLastSeenMsg(), SqliteStorage::setBufferLastSeenMsg(), PostgreSqlStorage::setBufferMarkerLineMsg(), SqliteStorage::setBufferMarkerLineMsg(), PostgreSqlStorage::setChannelPersistent(), SqliteStorage::setChannelPersistent(), setMaxId(), PostgreSqlStorage::setNetworkConnected(), SqliteStorage::setNetworkConnected(), PostgreSqlStorage::setPersistentChannelKey(), SqliteStorage::setPersistentChannelKey(), AbstractSqlStorage::setup(), SqliteStorage::setupSchemaVersion(), PostgreSqlStorage::setupSchemaVersion(), PostgreSqlStorage::setUserModes(), SqliteStorage::setUserModes(), PostgreSqlStorage::setUserSetting(), SqliteStorage::setUserSetting(), transaction(), PostgreSqlMigrationWriter::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(), prepareQuery(), PostgreSqlMigrationWriter::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(), 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().

virtual QString hostName ( )
inlineprotectedvirtualinherited

Reimplemented in PostgreSqlStorage.

Definition at line 70 of file abstractsqlstorage.h.

Referenced by AbstractSqlStorage::addConnectionToPool().

virtual int port ( )
inlineprotectedvirtualinherited

Reimplemented in PostgreSqlStorage.

Definition at line 71 of file abstractsqlstorage.h.

Referenced by AbstractSqlStorage::addConnectionToPool().

virtual QString userName ( )
inlineprotectedvirtualinherited

Reimplemented in PostgreSqlStorage.

Definition at line 73 of file abstractsqlstorage.h.

Referenced by AbstractSqlStorage::addConnectionToPool().

virtual QString password ( )
inlineprotectedvirtualinherited

Reimplemented in PostgreSqlStorage.

Definition at line 74 of file abstractsqlstorage.h.

Referenced by AbstractSqlStorage::addConnectionToPool().

virtual bool initDbSession ( QSqlDatabase &  )
inlineprotectedvirtualinherited

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 in PostgreSqlStorage.

Definition at line 83 of file abstractsqlstorage.h.

Referenced by AbstractSqlStorage::dbConnect().

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

Definition at line 269 of file abstractsqlstorage.h.

References AbstractSqlMigrator::_query.

Referenced by readMo().

QVariant value ( int  index)
inlineprotectedinherited

Definition at line 270 of file abstractsqlstorage.h.

References AbstractSqlMigrator::_query.

Referenced by 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

int _maxId
private

Definition at line 159 of file sqlitestorage.h.

Referenced by readMo(), and setMaxId().


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