You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
425 B
23 lines
425 B
#ifndef DB_MANAGER_H |
|
#define DB_MANAGER_H |
|
|
|
#include <sqlite3.h> |
|
#include <QString> |
|
#include <QObject> |
|
|
|
class DbManager : public QObject { |
|
Q_OBJECT |
|
public: |
|
explicit DbManager(const QString& path, QObject* parent = nullptr); |
|
~DbManager() override; |
|
|
|
bool isOpen() const { return m_db != nullptr; } |
|
sqlite3* handle() { return m_db; } |
|
|
|
private: |
|
void initTables(); |
|
|
|
sqlite3* m_db = nullptr; |
|
}; |
|
|
|
#endif
|
|
|