优化命名
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
#ifndef SQLCONTROLER_H
|
||||
#define SQLCONTROLER_H
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <qthread.h>
|
||||
#include <qqueue.h>
|
||||
#include <qmutex.h>
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
#include <sqlite3.h>
|
||||
#include <qdebug.h>
|
||||
#include <qfile.h>
|
||||
#include <sqliteManager/sqliteModule.h>
|
||||
#include "sqlStruct.h"
|
||||
#define sqlDefaultDatabasePath ".//sqlDatabase//sqlite-database.db"
|
||||
|
||||
|
||||
////////////此线程用于将数据存入sqlite文件/////////
|
||||
class sqlManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
//void update(std::string,std::vector<sqlData>);
|
||||
//sqlColDatas select(std::vector<std::string>selectStr, std::string, std::string);
|
||||
//sqlRowDatas selectRow(std::string SN, std::string Key,std::string Value);
|
||||
//sqlColDatas selectCol(std::vector<std::string>selectStr);
|
||||
//sqlErr insert(std::string, std::vector<sqlData>);
|
||||
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<sqlData> 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
|
||||
Reference in New Issue
Block a user