DBBase.h 877 B

123456789101112131415161718192021222324252627282930313233343536
  1. #pragma once
  2. #include "DBStoreBase.h"
  3. #include "DBTableBase.h"
  4. #include "DBQueryBase.h"
  5. #include <wtypes.h>
  6. namespace OTSSQLITE
  7. {
  8. class __declspec(dllexport) CDBBase
  9. {
  10. public:
  11. virtual BOOL Init(const BOOL a_bClean = FALSE) = 0;
  12. virtual BOOL CreateTable(const BOOL a_bForce = FALSE) = 0;
  13. virtual BOOL DeleteTable() = 0;
  14. // Removes all rows.
  15. virtual BOOL RemoveAllRows() = 0;
  16. virtual BOOL IsDBExist() = 0;
  17. virtual CDBStoreBasePtr GetDatastore() = 0;
  18. virtual CDBTableBasePtr GetTableInfo() = 0;
  19. virtual CDBQueryBasePtr GetTableQuery(LPCTSTR a_sOrderColumnName = nullptr)=0;
  20. virtual CDBQueryBasePtr GetCommandStringQuery(LPCTSTR a_commandStr = nullptr) = 0;
  21. };
  22. typedef std::shared_ptr<CDBBase> __declspec(dllexport) CDBBasePtr;
  23. __declspec(dllexport) CDBBasePtr CreateNewSQLiteDB(CDBStoreBasePtr a_datastore, CDBTableBasePtr a_tableInfo);
  24. }