DBBase.h 792 B

1234567891011121314151617181920212223242526272829303132333435
  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. };
  21. typedef std::shared_ptr<CDBBase> __declspec(dllexport) CDBBasePtr;
  22. __declspec(dllexport) CDBBasePtr CreateNewSQLiteDB(CDBStoreBasePtr a_datastore, CDBTableBasePtr a_tableInfo);
  23. }