klog
src
database
queryexecutor.h
1
#ifndef KLOG_DATABASE_QUERYEXECUTOR_H
2
#define KLOG_DATABASE_QUERYEXECUTOR_H
3
/***************************************************************************
4
queryexecutor.h - description
5
-------------------
6
begin : Apr 2024
7
copyright : (C) 2024 by Jaime Robles
8
email : jaime@robles.es
9
***************************************************************************/
10
11
/*****************************************************************************
12
* This file is part of KLog. *
13
* *
14
* KLog is free software: you can redistribute it and/or modify *
15
* it under the terms of the GNU General Public License as published by *
16
* the Free Software Foundation, either version 3 of the License, or *
17
* (at your option) any later version. *
18
* *
19
* KLog is distributed in the hope that it will be useful, *
20
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
21
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
22
* GNU General Public License for more details. *
23
* *
24
* You should have received a copy of the GNU General Public License *
25
* along with KLog. If not, see <https://www.gnu.org/licenses/>. *
26
* *
27
*****************************************************************************/
28
/*
29
This class defines a test to try to control DB executions from one
30
single place.
31
This class may be removed without any notice :)
32
*/
33
34
#include <QObject>
35
#include <QSqlQuery>
36
#include <QSqlError>
37
38
class
QueryExecutor
:
public
QObject
39
{
40
Q_OBJECT
41
public
:
42
explicit
QueryExecutor
(
const
QString &_parentClass);
43
bool
execQuery(
const
QString &
function
,
const
QString &stringQuery);
44
void
queryErrorManagement(
const
QString &_functionFailed,
const
QString &errorCodeS,
const
QString &_nativeError,
const
QString &_failedQuery);
45
46
private
:
47
48
49
};
50
51
#endif // QUERYEXECUTOR_H
QueryExecutor
Definition:
queryexecutor.h:38
Generated by
1.8.13