Home
last modified time | relevance | path

Searched refs:DistributedDB (Results 1 – 25 of 969) sorted by relevance

12345678910>>...39

/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/unittest/common/storage/
H A Ddistributeddb_storage_single_ver_natural_store_testcase.h43 DistributedDB::SQLiteSingleVerNaturalStoreConnection *&connection);
46 DistributedDB::SQLiteSingleVerNaturalStoreConnection *&connection);
49 DistributedDB::SQLiteSingleVerNaturalStoreConnection *&connection);
52 DistributedDB::SQLiteSingleVerNaturalStoreConnection *&connection);
55 DistributedDB::SQLiteSingleVerNaturalStoreConnection *&connection);
58 DistributedDB::SQLiteSingleVerNaturalStoreConnection *&connection);
61 DistributedDB::SQLiteSingleVerNaturalStoreConnection *&connection);
145 DistributedDB::SQLiteSingleVerNaturalStoreConnection *&connection);
151DistributedDB::SQLiteSingleVerNaturalStoreConnection *&connection, DistributedDB::IOption option);
154DistributedDB::SQLiteSingleVerNaturalStoreConnection *&connection, DistributedDB::IOption option);
[all …]
H A Ddistributeddb_storage_rd_single_ver_natural_store_testcase.h43 static void SyncDatabaseOperate001(DistributedDB::RdSingleVerNaturalStore *&store,
44 DistributedDB::RdSingleVerNaturalStoreConnection *&connection);
47 DistributedDB::RdSingleVerNaturalStoreConnection *&connection);
50 DistributedDB::RdSingleVerNaturalStoreConnection *&connection);
53 DistributedDB::RdSingleVerNaturalStoreConnection *&connection);
58 static void TestMetaDataPutAndGet(DistributedDB::RdSingleVerNaturalStore *&store,
59 DistributedDB::RdSingleVerNaturalStoreConnection *&connection);
62 DistributedDB::RdSingleVerNaturalStoreConnection *&connection);
65 DistributedDB::RdSingleVerNaturalStoreConnection *&connection, DistributedDB::IOption option);
68 DistributedDB::RdSingleVerNaturalStoreConnection *&connection, DistributedDB::IOption option);
[all …]
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/moduletest/common/distributeddb/include/
H A Ddistributeddb_nb_test_tools.h42 DistributedDB::CipherType cipher = DistributedDB::CipherType::DEFAULT; // cipher type
51 DistributedDB::Key key;
82 DistributedDB::Key key;
83 DistributedDB::Value oldValue;
160 DistributedDB::DBStatus status_ = DistributedDB::DBStatus::INVALID_ARGS;
200 static DistributedDB::DBStatus Get(DistributedDB::KvStoreNbDelegate &kvStoreNbDelegate,
201 const DistributedDB::Key &key, DistributedDB::Value &value);
204 const DistributedDB::Key &keyPrefix, std::vector<DistributedDB::Entry> &entries);
206 static DistributedDB::DBStatus Put(DistributedDB::KvStoreNbDelegate &kvStoreNbDelegate,
219 const DistributedDB::Key &key, DistributedDB::Value &value);
[all …]
H A Ddistributeddb_data_generator.h384 const DistributedDB::Key KEY_1 = { 'k', '1' };
401 const DistributedDB::Key KEY_EMPTY = { };
402 const DistributedDB::Key KEY_K = { 'k' };
403 const DistributedDB::Key KEY_A = { 'a' };
420 const DistributedDB::Value VALUE_EMPTY = { };
516 std::vector<DistributedDB::Key> &allKeys, std::vector<DistributedDB::Entry> &entriesBatch,
521 std::vector<DistributedDB::Key> &allKeys, std::vector<DistributedDB::Entry> &entriesBatch);
524 std::vector<DistributedDB::Key> &allKeys, std::vector<DistributedDB::Entry> &entriesBatch);
535 void GenerateFixedRecords(std::vector<DistributedDB::Entry> &entries, std::vector<DistributedDB::Ke…
553 void GenerateFixedLenRandRecords(std::vector<DistributedDB::Entry> &entries, std::vector<Distribute…
[all …]
H A Ddistributed_test_tools.h53 DistributedDB::CipherType cipher = DistributedDB::CipherType::DEFAULT; // cipher type
109 const DistributedDB::Key &putKey, const DistributedDB::Value &putValue);
356 static bool IsValueEquals(const DistributedDB::Value &v1, const DistributedDB::Value &v2);
367 static DistributedDB::DBStatus Put(DistributedDB::KvStoreDelegate &kvStoreDelegate,
368 const DistributedDB::Key &key, const DistributedDB::Value &value);
370 static DistributedDB::DBStatus PutBatch(DistributedDB::KvStoreDelegate &kvStoreDelegate,
373 static DistributedDB::DBStatus Delete(DistributedDB::KvStoreDelegate &kvStoreDelegate,
376 static DistributedDB::DBStatus DeleteBatch(DistributedDB::KvStoreDelegate &kvStoreDelegate,
379 static DistributedDB::DBStatus Clear(DistributedDB::KvStoreDelegate &kvStoreDelegate);
382 …static DistributedDB::Value Get(DistributedDB::KvStoreDelegate &kvStoreDelegate, const Distributed…
[all …]
H A Dkv_store_observer_impl.h31 class KvStoreObserverImpl final : public DistributedDB::KvStoreObserver {
33 void OnChange(const DistributedDB::KvStoreChangedData &data);
45 const std::list<DistributedDB::Entry> GetInsertList() const;
47 const std::list<DistributedDB::Entry> GetUpdateList() const;
49 const std::list<DistributedDB::Entry> GetDeleteList() const;
72 std::list<DistributedDB::Entry> insertedEntries_ = {};
73 std::list<DistributedDB::Entry> updatedEntries_ = {};
74 std::list<DistributedDB::Entry> deleteEntries_ = {};
79 std::list<DistributedDB::Entry> cumulatedInsertList_ = {};
80 std::list<DistributedDB::Entry> cumulatedUpdateList_ = {};
[all …]
H A Ddelegate_callback.h32 …void Callback(DistributedDB::DBStatus status, DistributedDB::KvStoreSnapshotDelegate *kvStoreSnaps…
33 void CallbackKv(DistributedDB::DBStatus status, const DistributedDB::Value &value);
35 DistributedDB::DBStatus GetStatus();
36 const DistributedDB::Value &GetValue();
38 const DistributedDB::KvStoreSnapshotDelegate *GetKvStoreSnapshot() in GetKvStoreSnapshot()
44 DistributedDB::DBStatus status_ = DistributedDB::DBStatus::INVALID_ARGS;
45 DistributedDB::Value value_ = {};
46 DistributedDB::KvStoreSnapshotDelegate *kvStoreSnapshotDelegate_ = nullptr;
H A Ddistributeddb_schema_test_tools.h269 std::vector<DistributedDB::Key> &allKeys);
278 const DistributedDB::Query &query, std::vector<DistributedDB::Entry> &expectEntry,
279 const DistributedDB::DBStatus status, bool canGetCount);
280 static DistributedDB::Value GenSchemaValue(DistributedDB::Value notSchemaValue);
283 std::vector<DistributedDB::Query> &queries) in ConstructInvalidQuery()
286 DistributedDB::Query::Select().EqualTo(field, value), in ConstructInvalidQuery()
292 DistributedDB::Query::Select().In(field, scope), in ConstructInvalidQuery()
293 DistributedDB::Query::Select().NotIn(field, scope), in ConstructInvalidQuery()
295 DistributedDB::Query::Select().IsNull(field), in ConstructInvalidQuery()
296 DistributedDB::Query::Select().IsNotNull(field), in ConstructInvalidQuery()
[all …]
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/unittest/common/common/
H A Ddistributeddb_tools_unit_test.h131 static void KvStoreDelegateCallback(DistributedDB::DBStatus, DistributedDB::KvStoreDelegate*,
132 DistributedDB::DBStatus &, DistributedDB::KvStoreDelegate *&);
136 DistributedDB::DBStatus &, DistributedDB::KvStoreSnapshotDelegate *&);
141 DistributedDB::DBStatus &, DistributedDB::KvStoreNbDelegate *&);
145DistributedDB::DBStatus, const DistributedDB::Value &, DistributedDB::DBStatus &, DistributedDB::V…
149 DistributedDB::DBStatus &, unsigned long &, std::vector<DistributedDB::Entry> &);
152 DistributedDB::DBStatus SyncTest(DistributedDB::KvStoreNbDelegate* delegate,
157 DistributedDB::DBStatus SyncTest(DistributedDB::KvStoreNbDelegate* delegate,
348 DistributedDB::DBStatus expect = DistributedDB::DBStatus::OK,
349 DistributedDB::DBStatus callbackExpect = DistributedDB::DBStatus::OK);
[all …]
H A Ddistributeddb_data_generate_unit_test.h61 const DistributedDB::Key KEY_1 = {'1'};
62 const DistributedDB::Value VALUE_1 = {'a'};
63 const DistributedDB::Key KEY_2 = {'2'};
64 const DistributedDB::Value VALUE_2 = {'b'};
65 const DistributedDB::Key KEY_3 = {'3'};
67 const DistributedDB::Key KEY_4 = {'4'};
69 const DistributedDB::Key KEY_5 = {'5'};
71 const DistributedDB::Key KEY_6 = {'6'};
73 const DistributedDB::Key KEY_7 = {'7'};
76 const DistributedDB::Key NULL_KEY_1;
[all …]
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/unittest/common/interfaces/
H A Ddistributeddb_interfaces_transaction_testcase.h35 bool localOnly, DistributedDB::KvStoreDelegateManager &mgr,
36 DistributedDB::KvStoreSnapshotDelegate *&snapshotDelegatePtr);
39 bool localOnly, DistributedDB::KvStoreDelegateManager &mgr);
46 DistributedDB::KvStoreSnapshotDelegate *&snapshotDelegatePtr);
49 DistributedDB::KvStoreSnapshotDelegate *&snapshotDelegatePtr);
52 DistributedDB::KvStoreSnapshotDelegate *&snapshotDelegatePtr);
55 DistributedDB::KvStoreSnapshotDelegate *&snapshotDelegatePtr);
58 DistributedDB::KvStoreSnapshotDelegate *&snapshotDelegatePtr);
61 DistributedDB::KvStoreSnapshotDelegate *&snapshotDelegatePtr);
68 DistributedDB::KvStoreSnapshotDelegate *&snapshotDelegatePtr);
[all …]
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/fuzztest/iprocesscommunicator_fuzzer/
H A Diprocesscommunicator_fuzzer.cpp24 using namespace DistributedDB;
38 return DistributedDB::OK; in Start()
43 return DistributedDB::OK; in Stop()
48 return DistributedDB::OK; in RegOnDeviceChange()
50 DistributedDB::DBStatus RegOnDataReceive(const DistributedDB::OnDataReceive &callback) override in RegOnDataReceive()
53 return DistributedDB::OK; in RegOnDataReceive()
55 DistributedDB::DBStatus SendData(const DistributedDB::DeviceInfos &dstDevInfo, in SendData()
58 return DistributedDB::OK; in SendData()
109 return DistributedDB::OK; in RegOnAccessControlledEvent()
119 return DistributedDB::OK; in SetSecurityOption()
[all …]
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/moduletest/include/
H A Ddistributeddb_nb_cursor_testcase.h26 static void ResultSetDb001(DistributedDB::KvStoreNbDelegate *delegate, bool isRowIdMode);
27 static void ResultSetDb002(DistributedDB::KvStoreNbDelegate *delegate, bool isRowIdMode);
28 static void ResultSetDb003(DistributedDB::KvStoreNbDelegate *delegate, bool isRowIdMode);
29 static void ResultSetDb004(DistributedDB::KvStoreNbDelegate *delegate, bool isRowIdMode);
30 static void ResultSetDb005(DistributedDB::KvStoreNbDelegate *delegate, bool isRowIdMode);
31 static void ResultSetDb006(DistributedDB::KvStoreNbDelegate *delegate, bool isRowIdMode);
32 static void ResultSetDb007(DistributedDB::KvStoreNbDelegate *delegate, bool isRowIdMode);
33 static void ResultSetDb008(DistributedDB::KvStoreNbDelegate *delegate, bool isRowIdMode);
34 static void ResultSetDb009(DistributedDB::KvStoreNbDelegate *delegate, bool isRowIdMode);
46 static void ResultSetDb021(DistributedDB::KvStoreNbDelegate *delegate,
[all …]
/ohos5.0/foundation/distributeddatamgr/data_object/frameworks/innerkitsimpl/test/unittest/src/
H A Dprocess_communicator_impl_test.cpp87 EXPECT_EQ(DistributedDB::DBStatus::OK, ret);
89 EXPECT_EQ(DistributedDB::DBStatus::OK, ret);
104 EXPECT_EQ(DistributedDB::DBStatus::OK, ret);
106 EXPECT_EQ(DistributedDB::DBStatus::OK, ret);
122 EXPECT_EQ(DistributedDB::DBStatus::OK, ret);
128 EXPECT_EQ(DistributedDB::DBStatus::OK, ret);
144 EXPECT_EQ(DistributedDB::DBStatus::OK, ret);
146 EXPECT_EQ(DistributedDB::DBStatus::OK, ret);
178 EXPECT_EQ(DistributedDB::DBStatus::OK, ret);
182 EXPECT_EQ(DistributedDB::DBStatus::OK, ret);
[all …]
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/unittest/common/communicator/
H A Ddistributeddb_communicator_common.h94 return DistributedDB::OK; in GetHeadDataSize()
100 DistributedDB::HostToNet(info.magic); in FillHeadData()
101 DistributedDB::HostToNet(info.length); in FillHeadData()
102 DistributedDB::HostToNet(info.version); in FillHeadData()
108 return DistributedDB::DB_ERROR; in FillHeadData()
110 return DistributedDB::OK; in FillHeadData()
114 DistributedDB::ExtendInfo localDbProperty_;
134 constexpr uint32_t HEADER_SIZE = sizeof(DistributedDB::CommPhyHeader) + sizeof(DistributedDB::CommD…
140 DistributedDB::Message *BuildRegedTinyMessage();
141 DistributedDB::Message *BuildRegedHugeMessage();
[all …]
/ohos5.0/foundation/distributeddatamgr/data_object/frameworks/innerkitsimpl/src/adaptor/
H A Dflat_object_storage_engine.cpp59 DistributedDB::KvStoreConfig config; in Open()
110 DistributedDB::DBStatus status; in CreateTable()
114 …[&status, &kvStore](DistributedDB::DBStatus dbStatus, DistributedDB::KvStoreNbDelegate *kvStoreNbD… in CreateTable()
126 DistributedDB::PragmaData data = static_cast<DistributedDB::PragmaData>(&autoSync); in CreateTable()
129 if (status != DistributedDB::DBStatus::OK) { in CreateTable()
176 DistributedDB::Entry entry; in GetTable()
191 if (status != DistributedDB::DBStatus::OK) { in GetTable()
231 std::vector<DistributedDB::Entry> entries; in UpdateItems()
307 DistributedDB::DBStatus status = in RegisterObserver()
402DistributedDB::DBStatus status = kvstore->Sync(deviceIds, DistributedDB::SyncMode::SYNC_MODE_PULL_… in SyncAllData()
[all …]
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/moduletest/common/distributeddb/src/
H A Ddistributeddb_nb_test_tools.cpp31 using namespace DistributedDB;
258 const DistributedDB::Key &key, DistributedDB::Value &value) in Get()
264 const DistributedDB::Key &keyPrefix, std::vector<DistributedDB::Entry> &entries) in GetEntries()
270 … const DistributedDB::Key &key, const DistributedDB::Value &value, bool isNeedRetry, int waitTime) in Put()
288 DistributedDB::DBStatus status; in PutBatch()
318 const DistributedDB::Key &key) in Delete()
327 DistributedDB::DBStatus status; in DeleteBatch()
357 const DistributedDB::Key &key, DistributedDB::Value &value) in GetLocal()
383 DistributedDB::DBStatus status; in PutLocalBatch()
409 DistributedDB::KvStoreNbDelegate &kvStoreNbDelegate, const DistributedDB::Key &key) in DeleteLocal()
[all …]
/ohos5.0/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/framework/metadata/
H A Dmeta_data_manager.cpp30 using DBOrigin = DistributedDB::Origin;
31 using DBChangeData = DistributedDB::ChangedData;
32 using Type = DistributedDB::Type;
55 … : (DistributedDB::OBSERVER_CHANGES_NATIVE | DistributedDB::OBSERVER_CHANGES_FOREIGN); in MetaObserver()
208 if (status != DistributedDB::DBStatus::OK) { in SaveMeta()
221 DistributedDB::Value data; in LoadMeta()
250 if (status != DistributedDB::DBStatus::OK && status != DistributedDB::DBStatus::NOT_FOUND) { in GetEntries()
268 DistributedDB::Value data; in DelMeta()
283 …return ((status == DistributedDB::DBStatus::OK) || (status == DistributedDB::DBStatus::NOT_FOUND)); in DelMeta()
303 if (status != DistributedDB::OK) { in Sync()
[all …]
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/innerkitsimpl/kvdb/test/
H A Dstore_util_test.cpp57 ASSERT_EQ(dbsecurity.securityFlag, DistributedDB::ECE);
61 ASSERT_EQ(dbsecurity.securityFlag, DistributedDB::ECE);
64 ASSERT_EQ(dbsecurity.securityLabel, DistributedDB::S3);
65 ASSERT_EQ(dbsecurity.securityFlag, DistributedDB::SECE);
68 ASSERT_EQ(dbsecurity.securityLabel, DistributedDB::S4);
69 ASSERT_EQ(dbsecurity.securityFlag, DistributedDB::ECE);
81 StoreUtil::DBSecurity dbSec = { DistributedDB::NOT_SET, DistributedDB::ECE };
85 dbSec = { DistributedDB::S3, DistributedDB::ECE };
88 dbSec = { DistributedDB::S3, DistributedDB::SECE };
92 dbSec = { DistributedDB::S4, DistributedDB::ECE };
[all …]
/ohos5.0/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/test/mock/
H A Ddb_store_mock.h23 using DBStatus = DistributedDB::DBStatus;
24 using Entry = DistributedDB::Entry;
25 using Key = DistributedDB::Key;
26 using Value = DistributedDB::Value;
28 using Query = DistributedDB::Query;
31 using SyncMode = DistributedDB::SyncMode;
32 using PragmaCmd = DistributedDB::PragmaCmd;
33 using PragmaData = DistributedDB::PragmaData;
40 using WatermarkInfo = DistributedDB::WatermarkInfo;
41 using ClearMode = DistributedDB::ClearMode;
[all …]
/ohos5.0/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/test/
H A Dvalue_proxy_test.cpp35 std::vector<DistributedDB::VBucket> dbVBuckets;
53 std::vector<DistributedDB::VBucket> dbVBuckets = {
143 DistributedDB::Assets dbAssets { dbAsset0, dbAsset1 };
257 DistributedDB::Asset asset;
300 EXPECT_EQ(result, DistributedDB::AssetStatus::NORMAL);
304 EXPECT_EQ(result, DistributedDB::AssetStatus::ABNORMAL);
308 EXPECT_EQ(result, DistributedDB::AssetStatus::INSERT);
312 EXPECT_EQ(result, DistributedDB::AssetStatus::UPDATE);
316 EXPECT_EQ(result, DistributedDB::AssetStatus::DELETE);
320 EXPECT_EQ(result, DistributedDB::AssetStatus::DOWNLOADING);
[all …]
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/innerkitsimpl/kvdb/include/
H A Dprocess_communication_impl.h26 class ProcessCommunicationImpl : public DistributedDB::IProcessCommunicator {
28 using DBStatus = DistributedDB::DBStatus;
29 using OnDeviceChange = DistributedDB::OnDeviceChange;
30 using OnDataReceive = DistributedDB::OnDataReceive;
41 …DBStatus SendData(const DistributedDB::DeviceInfos &dstDevInfo, const uint8_t *data, uint32_t leng…
43 uint32_t GetMtuSize(const DistributedDB::DeviceInfos &devInfo) override;
44 DistributedDB::DeviceInfos GetLocalDeviceInfos() override;
45 std::vector<DistributedDB::DeviceInfos> GetRemoteOnlineDeviceInfosList() override;
46 …bool IsSameProcessLabelStartedOnPeerDevice(const DistributedDB::DeviceInfos &peerDevInfo) override;
47 std::shared_ptr<DistributedDB::ExtendHeaderHandle> GetExtendHeaderHandle(
[all …]
/ohos5.0/foundation/distributeddatamgr/relational_store/rdbmock/frameworks/native/rdb/
H A Drelational_store_client.h24 namespace DistributedDB {
37 DistributedDB::DBStatus UnRegisterClientObserver(sqlite3 *db);
39 DistributedDB::DBStatus RegisterStoreObserver(sqlite3 *db,
40 const std::shared_ptr<DistributedDB::StoreObserver> &storeObserver);
42 DistributedDB::DBStatus UnregisterStoreObserver(sqlite3 *db,
43 const std::shared_ptr<DistributedDB::StoreObserver> &storeObserver);
45 DistributedDB::DBStatus UnregisterStoreObserver(sqlite3 *db);
47 DistributedDB::DBStatus Lock(
50 DistributedDB::DBStatus UnLock(
52 DistributedDB::DBStatus DropLogicDeletedData(sqlite3* db,
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/interfaces/include/relational/
H A Drelational_store_client.h30 std::map<std::string, DistributedDB::ChangeProperties> tableData;
34 using StoreObserver = DistributedDB::StoreObserver;
36 DB_API DistributedDB::DBStatus RegisterClientObserver(sqlite3 *db, const ClientObserver &clientObse…
38 DB_API DistributedDB::DBStatus UnRegisterClientObserver(sqlite3 *db);
40 DB_API DistributedDB::DBStatus RegisterStoreObserver(sqlite3 *db, const std::shared_ptr<StoreObserv…
42 DB_API DistributedDB::DBStatus UnregisterStoreObserver(sqlite3 *db,
45 DB_API DistributedDB::DBStatus UnregisterStoreObserver(sqlite3 *db);
47 DB_API DistributedDB::DBStatus DropLogicDeletedData(sqlite3 *db, const std::string &tableName, uint…
49 DB_API DistributedDB::DBStatus Lock(const std::string &tableName, const std::vector<std::vector<uin…
52 DB_API DistributedDB::DBStatus UnLock(const std::string &tableName, const std::vector<std::vector<u…
/ohos5.0/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/app/src/
H A Dkvstore_meta_manager.cpp56 using namespace DistributedDB;
275 DistributedDB::DBStatus dbStatusTmp = DistributedDB::DBStatus::NOT_SUPPORT; in CreateMetaKvStore()
280 …[&delegate, &dbStatusTmp](DistributedDB::DBStatus dbStatus, DistributedDB::KvStoreNbDelegate *nbDe… in CreateMetaKvStore()
331 option.secOption = { DistributedDB::S1, DistributedDB::ECE }; in InitDBOption()
366 int mode = DistributedDB::OBSERVER_CHANGES_NATIVE | DistributedDB::OBSERVER_CHANGES_FOREIGN; in SubscribeMetaKvStore()
368 if (dbStatus != DistributedDB::DBStatus::OK) { in SubscribeMetaKvStore()
390 const std::list<DistributedDB::Entry> &entries) in HandleChanges()
452 std::vector<DistributedDB::DBInfo> dbInfos; in OnDataChange()
475 DistributedDB::DBInfo dbInfo; in AddDbInfo()
486 std::vector<DistributedDB::DBInfo> dbInfos; in OnDeviceChange()
[all …]

12345678910>>...39