!2385 fix:覆写kv_store父类方法GetDatabaseStatus

Merge pull request !2385 from cht/master
This commit is contained in:
openharmony_ci 2024-10-31 12:44:00 +00:00 committed by Gitee
commit 55e2dfbc62
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 12 additions and 0 deletions

View File

@ -382,5 +382,10 @@ DBStatus DBStoreMock::CancelSync(uint32_t syncId)
{
return NOT_SUPPORT;
};
KvStoreNbDelegate::DatabaseStatus DBStoreMock::GetDatabaseStatus() const
{
return {};
}
} // namespace DistributedData
} // namespace OHOS

View File

@ -115,6 +115,7 @@ public:
DBStatus GetDeviceEntries(const std::string &device, std::vector<Entry> &entries) const override;
DBStatus Sync(const DeviceSyncOption &option, const DeviceSyncProcessCallback &onProcess) override;
DBStatus CancelSync(uint32_t syncId) override;
DatabaseStatus GetDatabaseStatus() const override;
private:
static const uint32_t DEFAULT_SIZE = 0;
DBStatus Get(ConcurrentMap<Key, Value> &store, const Key &key, Value &value) const;

View File

@ -332,4 +332,9 @@ DBStatus KvStoreNbDelegateMock::CancelSync(uint32_t syncId)
{
return DBStatus::OK;
}
KvStoreNbDelegate::DatabaseStatus KvStoreNbDelegateMock::GetDatabaseStatus() const
{
return {};
}
} // namespace DistributedDB

View File

@ -106,6 +106,7 @@ public:
DBStatus GetDeviceEntries(const std::string &device, std::vector<Entry> &entries) const;
DBStatus Sync(const DeviceSyncOption &option, const DeviceSyncProcessCallback &onProcess);
DBStatus CancelSync(uint32_t syncId);
DatabaseStatus GetDatabaseStatus() const;
};
} // namespace DistributedDB
#endif // KV_STORE_NB_DELEGATE_H_MOCK