From 7c8b300d13dfbf2b3565a99a52bf6654e157c01d Mon Sep 17 00:00:00 2001 From: Alexandr Chernov Date: Tue, 17 Dec 2024 11:19:03 +0100 Subject: [PATCH] GSvarServer: output cache queries --- src/cppREST/ServerDB.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cppREST/ServerDB.cpp b/src/cppREST/ServerDB.cpp index 1716c3b60..b63b0fa37 100644 --- a/src/cppREST/ServerDB.cpp +++ b/src/cppREST/ServerDB.cpp @@ -461,8 +461,10 @@ bool ServerDB::addFileLocation(const QString filename_with_path, const QString t QString json_string = json_content.replace("'", "''"); // json_string = json_string.replace("\\", "\\\\"); json_string = json_string.replace("\"", "\\\""); - QSqlQuery query = db_->exec("INSERT INTO file_locations (filename_with_path, type, locus, multiple_files, return_if_missing, json_content, requested)" - " VALUES (\"" + filename_with_path + "\", \"" + type + "\", \"" + locus + "\", " + QString::number(static_cast(multiple_files)) + ", " + QString::number(static_cast(return_if_missing)) + ", \"" + json_string + "\", " + QString::number(requested_as_num) + ")"); + QString query_text = "INSERT INTO file_locations (filename_with_path, type, locus, multiple_files, return_if_missing, json_content, requested)" + " VALUES (\"" + filename_with_path + "\", \"" + type + "\", \"" + locus + "\", " + QString::number(static_cast(multiple_files)) + ", " + QString::number(static_cast(return_if_missing)) + ", \"" + json_string + "\", " + QString::number(requested_as_num) + ")"; + Log::error(query_text); + QSqlQuery query = db_->exec(query_text); bool success = query.lastError().text().trimmed().isEmpty(); if(!success) {