5 #include <QtSql/QSqlQuery>
6 #include <QtSql/QSqlError>
7 #include <QtSql/QSqlRecord>
9 #include <QStandardItemModel>
11 #include <QStandardItem>
13 #include <QCoreApplication>
18 #include "exceptions/dbexception.h"
19 #include "utils/log.h"
20 #include "parameters.h"
21 #include "database/accessdatabase.h"
23 using namespace Exceptions;
24 using namespace Utils;
48 QString lastError(
const QSqlQuery& q)
const;
60 void executeFile(QString pName);
65 void openTransaction();
70 void closeTransaction();
91 void setDatabase(QSqlDatabase sql);
96 void updateBillingNumber();
102 void cleanDatabase();
108 void changeDatabase(Databases::DbType dbType);
131 QVariant value(
const QSqlQuery& q,
const QString& champ)
const;
133 static bool _isMysql;
The DbException class for database exception : queries, db file, …
Definition: dbexception.h:18
The Database class Master class for all database access.
Definition: database.h:34
static bool _dbInstance
an instance of db is open
Definition: database.h:116
QSqlDatabase mDatabase
contains Database
Definition: database.h:120
static bool isOpen
Database is open.
Definition: database.h:123
QList< Database * > _instances
List of instances.
Definition: database.h:121
QSettings * _settings
settings
Definition: database.h:118
static Database * _instance
Instance.
Definition: database.h:115