SqlDBHelper.h 676 B

123456789101112131415161718192021222324252627
  1. #ifndef SQLDBHELPER_H
  2. #define SQLDBHELPER_H
  3. #include "EasyQtSql.h"
  4. using namespace EasyQtSql;
  5. class SqlDBHelper
  6. {
  7. public:
  8. enum SqlDBType
  9. {
  10. SQLITE3 = 1,
  11. MYSQL,
  12. NOTHING
  13. };
  14. static QSqlDatabase getDatabase(SqlDBType dbType = SQLITE3,
  15. const QString &connectionName = QSqlDatabase::defaultConnection);
  16. static QSqlDatabase getDatabase2(SqlDBType dbType = SQLITE3,
  17. const QString &connectionName = QSqlDatabase::defaultConnection);
  18. private:
  19. static bool configFinished;
  20. static bool configFinished2;
  21. };
  22. #endif // SQLDBHELPER_H