source: src/sql/sqlengine.h @ c129f8a6

qt5
Last change on this file since c129f8a6 was 3a8dc71, checked in by pavelpa <pavelpa@…>, 13 years ago

SqlEngine? made STATIC

  • Property mode set to 100644
File size: 1016 bytes
Line 
1#ifndef SQLENGINE_H
2#define SQLENGINE_H
3
4#include <QObject>
5#include <QHash>
6
7class QSqlDatabase;
8
9class SqlEngine : public QObject
10{
11    Q_OBJECT
12    public:
13        SqlEngine(QObject *aParent = NULL);
14        ~SqlEngine();
15        static void initialize();
16        static void addConferenceToDB(QHash<QString,QString> &aConference);
17        static void addEventToDB(QHash<QString,QString> &aEvent);
18        static void addPersonToDB(QHash<QString,QString> &aPerson);
19        static void addLinkToDB(QHash<QString,QString> &aLink);
20        static void addRoomToDB(QHash<QString,QString> &aRoom);
21
22        // search Events for ....
23        static int searchEvent(int conferenceId, const QHash<QString,QString> &columns, const QString &keyword);
24    private:
25        static QString login(const QString &aDatabaseType, const QString &aDatabaseName);
26        static bool createTables(QSqlDatabase &aDatabase);
27        static bool execQuery(QSqlDatabase &aDatabase, const QString &aQuery);
28};
29
30#endif /* SQLENGINE_H */
31
Note: See TracBrowser for help on using the repository browser.