-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsqlinterface.h
31 lines (23 loc) · 913 Bytes
/
sqlinterface.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef SQLINTERFACE_H
#define SQLINTERFACE_H
#include "sqlhandler/serialization.h"
#include "treemodel.h"
#include <QSqlDatabase>
class SQLInterface
{
public:
SQLInterface();
~SQLInterface();
bool getParameterStructure(QVector<TreeData> &structuredata);
bool getParameterValuesMinMax(std::map<uint32_t, parameter_min_max_val_serial_entry>& IDtoParam);
bool writeParameterValues(QVector<parameter_serial_entry>& writedata);
bool getResultOrInputStructure(QVector<TreeData> &structuredata, const char *table);
bool getResultOrInputValues(const char *table, const QVector<int>& IDs, QVector<QVector<double>> &seriesout, QVector<int64_t> &startdatesout);
bool getExenameFromParameterInfo(QString& exename);
bool setDatabase(QString& path);
bool databaseIsSet() { return dbIsSet_; }
private:
bool dbIsSet_ = false;
QSqlDatabase db_;
};
#endif // SQLINTERFACE_H