2019-04-06 17:16:42 +02:00
|
|
|
#ifndef COMMAND_H
|
|
|
|
#define COMMAND_H
|
|
|
|
#include <QStringList>
|
|
|
|
#include <QSqlDatabase>
|
|
|
|
#include <QSqlQuery>
|
|
|
|
#include <QThreadStorage>
|
|
|
|
#include <QVariant>
|
2019-04-10 18:57:27 +02:00
|
|
|
#include "utils.h"
|
2019-04-16 08:54:49 +02:00
|
|
|
#include "sqlitedbservice.h"
|
2019-04-06 17:16:42 +02:00
|
|
|
class Command
|
|
|
|
{
|
|
|
|
protected:
|
2019-04-16 08:54:49 +02:00
|
|
|
SqliteDbService *dbService;
|
2019-04-06 17:16:42 +02:00
|
|
|
QString dbConnectionString;
|
|
|
|
|
|
|
|
public:
|
2019-04-16 08:54:49 +02:00
|
|
|
Command(SqliteDbService &dbService)
|
2019-04-06 17:16:42 +02:00
|
|
|
{
|
2019-04-16 08:54:49 +02:00
|
|
|
this->dbService = &dbService;
|
2019-04-06 17:16:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
QSqlDatabase dbConnection();
|
|
|
|
virtual int handle(QStringList arguments) = 0;
|
|
|
|
virtual ~Command(){};
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // COMMAND_H
|