Changeset View
Changeset View
Standalone View
Standalone View
runners/bookmarks/fetchsqlite.h
Show All 29 Lines | |||||
30 | #include <QObject> | 30 | #include <QObject> | ||
31 | #include <QMutex> | 31 | #include <QMutex> | ||
32 | 32 | | |||
33 | 33 | | |||
34 | class FetchSqlite : public QObject | 34 | class FetchSqlite : public QObject | ||
35 | { | 35 | { | ||
36 | Q_OBJECT | 36 | Q_OBJECT | ||
37 | public: | 37 | public: | ||
38 | explicit FetchSqlite(const QString &originalFile, const QString ©To, QObject *parent = nullptr); | 38 | explicit FetchSqlite(const QString &databaseFile, QObject *parent = nullptr); | ||
39 | ~FetchSqlite() override; | 39 | ~FetchSqlite() override; | ||
40 | void prepare(); | 40 | void prepare(); | ||
41 | void teardown(); | 41 | void teardown(); | ||
42 | QList<QVariantMap> query(const QString &sql, QMap<QString,QVariant> bindObjects); | 42 | QList<QVariantMap> query(const QString &sql, QMap<QString,QVariant> bindObjects); | ||
43 | QList<QVariantMap> query(const QString &sql); | 43 | QList<QVariantMap> query(const QString &sql); | ||
44 | QStringList tables(QSql::TableType type = QSql::Tables); | 44 | QStringList tables(QSql::TableType type = QSql::Tables); | ||
45 | 45 | | |||
46 | private: | 46 | private: | ||
47 | QString const m_databaseFile; | 47 | QString const m_databaseFile; | ||
48 | QMutex m_mutex; | 48 | QMutex m_mutex; | ||
49 | }; | 49 | }; | ||
50 | 50 | | |||
51 | #endif // FETCHSQLITE_H | 51 | #endif // FETCHSQLITE_H |