#ifndef _SqlExecute_H__ #define _SqlExecute_H__ /* \author: zym \brief : \version 1.0 \note \CopyRight:zym */ #include #include #include #include #include #include #include #include #include class SqlExecute :public QObject { Q_OBJECT public: SqlExecute(QObject * parent = NULL); virtual ~SqlExecute(); static void init(QString sDriver, QString sUser, QString sPasswd, QString sDBFile); static bool exeRead(QString sql, QList &list); static bool exeRead(QString sql, QList> &list, QStringList sResuleSeq); static bool exeWrite(QString sql); static void destroyConn(); static QSqlDatabase getDataBase(); private: bool saveSql(QString sqlAction); QList getValues(QSharedPointer sqlQuery, int page, int pageNum); }; #endif // SqlExecute_h__