MauiKit Accounts

accountsdb.h
1#pragma once
2#include <QObject>
3
4#include <QDebug>
5#include <QDir>
6#include <QFileInfo>
7#include <QList>
8#include <QObject>
9#include <QSqlDatabase>
10#include <QSqlDriver>
11#include <QSqlError>
12#include <QSqlQuery>
13#include <QSqlRecord>
14#include <QString>
15#include <QStringList>
16#include <QVariantMap>
17
18#include <MauiKit4/Core/fmh.h>
19
20class AccountsDB : public QObject
21{
23
24private:
25 QString name;
26 QSqlDatabase m_db;
27
28public:
29 /* utils*/
30 explicit AccountsDB(QObject *parent = nullptr);
31 ~AccountsDB();
32 bool checkExistance(const QString &tableName, const QString &searchId, const QString &search);
33 bool checkExistance(const QString &queryStr);
34 QSqlQuery getQuery(const QString &queryTxt);
35 void openDB(const QString &name);
36 void prepareCollectionDB() const;
37
38 bool insert(const QString &tableName, const QVariantMap &insertData);
39 bool update(const QString &tableName, const FMH::MODEL &updateData, const QVariantMap &where);
40 bool update(const QString &table, const QString &column, const QVariant &newValue, const QVariant &op, const QString &id);
41 bool remove(const QString &tableName, const FMH::MODEL &removeData);
42};
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:10:56 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.