123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- #pragma once
- //#include "SQLiteDB.h"
- #include "DBConst.h"
- #include "DBStoreBase.h"
- #include "DBBase.h"
- namespace OTSSQLITE
- {
- class __declspec(dllexport) CInformationDB
- {
- public:
- CInformationDB(CDBStoreBasePtr a_datastore);
- virtual ~CInformationDB(void);
- BOOL InsertRow(LPCTSTR a_sItemName, LPCTSTR a_sItemContent, LPCTSTR a_sItemComment = nullptr);
- BOOL InsertStringRow(LPCTSTR a_sItemName, LPCTSTR a_sItemContent, LPCTSTR a_sItemComment = nullptr);
- BOOL InsertIntegerRow(LPCTSTR a_sItemName, int a_nItemContent, LPCTSTR a_sItemComment = nullptr);
- BOOL InsertDoubleRow(LPCTSTR a_sItemName, double a_dItemContent, LPCTSTR a_sItemComment = nullptr);
- BOOL InsertTimeStampRow(LPCTSTR a_sItemName, LPCTSTR a_sItemComment = nullptr);
- BOOL UpdateRow(LPCTSTR a_sItemName, LPCTSTR a_sItemContent, LPCTSTR a_sItemComment = nullptr);
- BOOL UpdateStringRow(LPCTSTR a_sItemName, LPCTSTR a_sItemContent, LPCTSTR a_sItemComment = nullptr);
- BOOL UpdateIntegerRow(LPCTSTR a_sItemName, int a_nItemContent, LPCTSTR a_sItemComment = nullptr);
- BOOL UpdateDoubleRow(LPCTSTR a_sItemName, double a_dItemContent, LPCTSTR a_sItemComment = nullptr);
- BOOL UpdateTimeStampRow(LPCTSTR a_sItemName, LPCTSTR a_sItemComment = nullptr);
- BOOL DeleteRow(LPCTSTR a_sItemName);
- BOOL GetStringValue(LPCTSTR a_sItemName, CString& a_sString);
- BOOL GetIntValue(LPCTSTR a_sItemName, int& a_nValue);
- virtual CDBTableBasePtr GetTableInfo() ;
-
-
- virtual BOOL Init(const BOOL a_bClean = FALSE) ;
- virtual BOOL CreateTable(const BOOL a_bForce = FALSE) ;
- virtual BOOL DeleteTable() ;
- virtual BOOL RemoveAllRows() ;
- virtual BOOL IsDBExist() ;
- virtual CDBStoreBasePtr GetDatastore() ;
- virtual CDBQueryBasePtr GetTableQuery(LPCTSTR a_sOrderColumnName = nullptr) ;
- protected:
- CDBTableBasePtr m_tableInfo;
- private:
- CDBBasePtr myDB;
- };
- typedef std::shared_ptr<CInformationDB> CInformationDBPtr;
- }
|