#ifndef SQLCONTROLER_H #define SQLCONTROLER_H #include #include #include #include #include #include #include #include #include #include #include #include "sqlStruct.h" #define sqlDefaultDatabasePath ".//sqlDatabase//sqlite-database.db" ////////////此线程用于将数据存入sqlite文件///////// class sqlManager : public QObject { Q_OBJECT public: //void update(std::string,std::vector); //sqlColDatas select(std::vectorselectStr, std::string, std::string); //sqlRowDatas selectRow(std::string SN, std::string Key,std::string Value); //sqlColDatas selectCol(std::vectorselectStr); //sqlErr insert(std::string, std::vector); sqlTableDatas selectSingleData(std::string selectStr, std::string SN); sqlTableDatas selectAllData(std::string SN); //sqlTableDatas selectAllData(std::string tableName = ""); //sqlRowDatas selectData(std::string name, std::string value, std::string tableName = ""); void initPara(std::string dataBasePath = sqlDefaultDatabasePath,bool backUp=true); bool addData(std::string SN, std::vector data); int checktSn(std::string sn); void checkCol(sqlite3* db,std::string tableName,std::string columnName); void uninitlize(); sqlite3* db; sqlBase* dbPtr; private: QObject* m_obj; signals: }; #endif #pragma once