mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-10 03:53:26 -08:00
[Server] Move replay access reads and writes into the database interface (#7838)
cmdReplayList, cmdReplayDownload, cmdReplayModifyMatch and cmdReplayDeleteMatch issued their own SQL through Servatrice_DatabaseInterface. Add ReplayMatchRecord/ReplayEntry and the ReplayAccessResult/ReplayWriteResult enums to Server_DatabaseInterface, implement the list, data, do-not-hide and delete operations with the same statements and response mapping, and let the commands ask the injected interface. checkSql stays in the two write commands where it already was.
This commit is contained in:
parent
ba037cbf04
commit
b2e69d3443
4 changed files with 196 additions and 78 deletions
|
|
@ -158,6 +158,10 @@ public:
|
|||
bool getDeckShareItem(const QString &token, int itemId, QString &content) override;
|
||||
/** @brief Id and color identity of every deck file in a folder, for the share builder. */
|
||||
bool getDeckFilesInFolder(int folderId, int userId, QList<DeckFileListItem> &files) override;
|
||||
QList<ReplayMatchRecord> getReplayList(int userId) override;
|
||||
ReplayAccessResult getReplayData(int replayId, int userId, QByteArray &data) override;
|
||||
ReplayWriteResult setReplayDoNotHide(int gameId, int userId, bool doNotHide) override;
|
||||
ReplayWriteResult deleteReplayAccess(int gameId, int userId) override;
|
||||
/** @brief Deletes all expired share bundles (cascades to their items). */
|
||||
void cleanupExpiredDeckShares();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue