From f23e8a5181a0e5639c9da73829c42165deff78c4 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 7 Nov 2024 06:25:40 +0000 Subject: [PATCH] Code format - (Clang-format) --- src/database/database.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/database/database.cpp b/src/database/database.cpp index a925aff8a0e..b5316b020b4 100644 --- a/src/database/database.cpp +++ b/src/database/database.cpp @@ -62,7 +62,7 @@ bool Database::connect(const std::string* host, const std::string* user, const s } namespace { - std::string createBackupFileName(const std::string& backupDir, const std::string& formattedTime) { + std::string createBackupFileName(const std::string &backupDir, const std::string &formattedTime) { std::filesystem::create_directories(backupDir); return fmt::format("{}/backup_{}.sql", backupDir, formattedTime); } @@ -75,7 +75,7 @@ namespace { return mysql_store_result(handle); } - void writeCreateTableStatement(MYSQL* handle, const std::string& tableName, std::ofstream& backupFile) { + void writeCreateTableStatement(MYSQL* handle, const std::string &tableName, std::ofstream &backupFile) { std::string createTableQuery = fmt::format("SHOW CREATE TABLE `{}`", tableName); if (mysql_query(handle, createTableQuery.c_str()) == 0) { MYSQL_RES* createTableResult = mysql_store_result(handle); @@ -91,7 +91,7 @@ namespace { } } - void writeValue(std::ofstream& backupFile, const char* value, const MYSQL_FIELD& field, unsigned long length) { + void writeValue(std::ofstream &backupFile, const char* value, const MYSQL_FIELD &field, unsigned long length) { if (!value) { backupFile << "NULL"; return; @@ -106,7 +106,7 @@ namespace { } } - void writeTableData(MYSQL* handle, const std::string& tableName, std::ofstream& backupFile) { + void writeTableData(MYSQL* handle, const std::string &tableName, std::ofstream &backupFile) { std::string selectQuery = fmt::format("SELECT * FROM `{}`", tableName); if (mysql_query(handle, selectQuery.c_str()) != 0) { g_logger().error("Failed to retrieve data from table {}: {}", tableName, mysql_error(handle));