[Merchants] Convert Clear/Delete/Save of Temporary Merchant Lists to Repositories (#3945)

* [Merchants] Convert Clear/Delete/Save of Temporary Merchant Lists to Repositories

- Convert `ClearMerchantTemp()`, `DeleteMerchantTemp()`, and `SaveMerchantTemp()` to repositories.

* Update merchantlist_temp_repository.h
This commit is contained in:
Alex King
2024-01-13 00:47:25 -05:00
committed by GitHub
parent 1d7f39c13b
commit 5d1c59c95f
4 changed files with 45 additions and 11 deletions
@@ -16,6 +16,7 @@
#include "../../strings.h"
#include <ctime>
class BaseMerchantlistTempRepository {
public:
struct MerchantlistTemp {
@@ -44,7 +44,15 @@ public:
*/
// Custom extended repository methods here
static void ClearTemporaryMerchantLists(Database& db)
{
db.QueryDatabase(
fmt::format(
"TRUNCATE {}",
TableName()
)
);
}
};
#endif //EQEMU_MERCHANTLIST_TEMP_REPOSITORY_H