mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-10 03:53:26 -08:00
[Server] Move the database lifecycle calls onto the interface (#7859)
This commit is contained in:
parent
526d528e96
commit
0caacb27c1
4 changed files with 24 additions and 6 deletions
|
|
@ -66,11 +66,11 @@ public slots:
|
|||
public:
|
||||
explicit Servatrice_DatabaseInterface(int _instanceId, Servatrice *_server);
|
||||
~Servatrice_DatabaseInterface() override;
|
||||
bool initDatabase(const QString &type,
|
||||
bool openDatabase(const QString &type,
|
||||
const QString &hostName,
|
||||
const QString &databaseName,
|
||||
const QString &userName,
|
||||
const QString &password);
|
||||
const QString &password) override;
|
||||
bool openDatabase();
|
||||
bool checkSql() override;
|
||||
QSqlQuery *prepareQuery(const QString &queryText);
|
||||
|
|
@ -94,7 +94,7 @@ public:
|
|||
/** @brief Drop the account's legacy password backup. */
|
||||
void clearLegacyBackup(const QString &user);
|
||||
/** @brief Drop every legacy password backup that has not been used within the TTL. */
|
||||
void purgeExpiredLegacyBackups();
|
||||
void purgeExpiredLegacyBackups() override;
|
||||
int getUserIdInDB(const QString &name);
|
||||
int getUserId(const QString &name) override;
|
||||
bool addToBuddyList(int userId, int targetId) override;
|
||||
|
|
@ -172,7 +172,7 @@ public:
|
|||
ReplayAccessResult getLatestReplayForGame(int gameId, int &replayId, QByteArray &data) override;
|
||||
ReplayWriteResult grantReplayAccessByName(int gameId, const QString &userName) override;
|
||||
/** @brief Deletes all expired share bundles (cascades to their items). */
|
||||
void cleanupExpiredDeckShares();
|
||||
void cleanupExpiredDeckShares() override;
|
||||
|
||||
int getNextGameId() override;
|
||||
int getNextReplayId() override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue