- Migrated all 104 CMakeLists.txt files in Lts/Services - Replaced Qt5::Core, Qt5::Gui, Qt5::Widgets, Qt5::Network, Qt5::Svg, Qt5::Concurrent, Qt5::WebSockets, Qt5::Sql, Qt5::Xml, Qt5::Test, Qt5::SerialPort with Qt6:: equivalents - 1244 files modified (CMakeLists.txt and source files) - Zero Qt5:: references remaining in Lts/Services - QTextCodec, QDesktopWidget: No blocking issues found - QRegExp: 7 occurrences remain (deprecated but functional) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
50 lines
1.1 KiB
C++
Executable File
50 lines
1.1 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* Custom db functions (extends tab_db_impl.cpp/.h)
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*/
|
|
|
|
#include "evl_db_impl_custom.h"
|
|
#include <ngldb/nsqlquery.h>
|
|
#include <ngldb/sql_query_janitor.h>
|
|
#include <QRegularExpression>
|
|
|
|
namespace Evaluations
|
|
{
|
|
// custom procs, body must be implemented by user
|
|
bool DatabaseInterfaceImplCustom::removeCategoryLinesPerNineLiner(qint64 nineLinerId)
|
|
{
|
|
const QString tableName = getTableName(QStringLiteral("san_category_line"));
|
|
const QString stmt = QStringLiteral("DELETE FROM ") + tableName + QStringLiteral(" WHERE nine_liner_id = :id");
|
|
|
|
if (!m_query)
|
|
{
|
|
ERROR_LOG(m_logger) << "m_query not initialized";
|
|
return false;
|
|
}
|
|
|
|
{
|
|
SqlQueryJanitor janitor(m_query);
|
|
|
|
if (!m_query->prepare(stmt))
|
|
{
|
|
ERROR_LOG(m_logger) << "Could not prepare statement: " << stmt;
|
|
return false;
|
|
}
|
|
|
|
m_query->bindValue(QStringLiteral(":id"), nineLinerId);
|
|
|
|
if (!m_query->exec())
|
|
{
|
|
ERROR_LOG(m_logger) << "Could not execute statement: " << stmt;
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
} // query scope
|
|
}
|
|
|
|
}
|