source: src/sql/sqlengine.h @ e7340e1

qt5
Last change on this file since e7340e1 was e662750, checked in by timkoma <timkoma@…>, 13 years ago

first working version of the search

  • Property mode set to 100644
File size: 938 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        void initialize();
16        void addConferenceToDB(QHash<QString,QString> &aConference);
17        void addEventToDB(QHash<QString,QString> &aEvent);
18        void addPersonToDB(QHash<QString,QString> &aPerson);
19        void addLinkToDB(QHash<QString,QString> &aLink);
20        void addRoomToDB(QHash<QString,QString> &aRoom);
21
22        // search Events for ....
23        int searchEvent(int conferenceId, const QList<QString> &columns, const QString &keyword);
24    private:
25        QString login(const QString &aDatabaseType, const QString &aDatabaseName);
26        bool createTables(QSqlDatabase &aDatabase);
27        bool execQuery(QSqlDatabase &aDatabase, const QString &aQuery);
28};
29
30#endif /* SQLENGINE_H */
31
Note: See TracBrowser for help on using the repository browser.