1 /* 2 * Copyright (c) 2025 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 #ifndef VIRTUAL_SQLITE_RELATIONAL_STORE_H 16 #define VIRTUAL_SQLITE_RELATIONAL_STORE_H 17 18 #include "sqlite_relational_store.h" 19 20 namespace DistributedDB { 21 class VirtualSqliteRelationalStore : public SQLiteRelationalStore { 22 public: 23 VirtualSqliteRelationalStore() = default; 24 ~VirtualSqliteRelationalStore() override = default; 25 26 void SetStorageEngine(const std::shared_ptr<SQLiteSingleRelationalStorageEngine> &engine); 27 28 int CallCheckTrackerTable(const TrackerSchema &trackerSchema, TableInfo &table, bool &isNoTableInSchema, 29 bool &isFirstCreate); 30 31 void CallCleanDirtyLogIfNeed(const std::string &tableName) const; 32 33 RelationalSchemaObject CallGetSchemaObj() const; 34 }; 35 } // namespace DistributedDB 36 #endif // VIRTUAL_SQLITE_RELATIONAL_STORE_H