Home
last modified time | relevance | path

Searched refs:kvStore (Results 1 - 25 of 71) sorted by relevance

123

/foundation/communication/dsoftbus/tests/core/adapter/unittest/
H A Dlnn_kv_adapter_test.cpp30 shared_ptr<KVAdapter> kvStore = nullptr; member
47 kvStore = make_shared<KVAdapter>(APP_ID, STORE_ID); in SetUpTestCase()
56 kvStore->Init(); in SetUp()
61 kvStore->DeInit(); in TearDown()
72 kvStore->DeInit(); in HWTEST_F()
73 EXPECT_EQ(SOFTBUS_OK, kvStore->Init()); in HWTEST_F()
84 EXPECT_EQ(SOFTBUS_OK, kvStore->DeInit()); in HWTEST_F()
95 EXPECT_EQ(SOFTBUS_OK, kvStore->Put("key1", "value1")); in HWTEST_F()
106 EXPECT_EQ(SOFTBUS_INVALID_PARAM, kvStore->Put("", "value1")); in HWTEST_F()
107 EXPECT_EQ(SOFTBUS_INVALID_PARAM, kvStore in HWTEST_F()
[all...]
/foundation/deviceprofile/device_info_manager/services/core/test/unittest/
H A Dkv_adapter_test.cpp42 shared_ptr<IKVAdapter> kvStore = nullptr; member
55 kvStore = make_shared<KVAdapter>(APP_ID, STORE_ID, in SetUpTestCase()
67 kvStore->Init(); in SetUp()
72 kvStore->UnInit(); in TearDown()
83 kvStore->UnInit(); in HWTEST_F()
84 EXPECT_EQ(DP_SUCCESS, kvStore->Init()); in HWTEST_F()
95 EXPECT_EQ(DP_SUCCESS, kvStore->UnInit()); in HWTEST_F()
106 EXPECT_EQ(DP_SUCCESS, kvStore->Put("key1", "value1")); in HWTEST_F()
117 EXPECT_EQ(DP_INVALID_PARAMS, kvStore->Put("", "value1")); in HWTEST_F()
118 EXPECT_EQ(DP_INVALID_PARAMS, kvStore in HWTEST_F()
[all...]
H A Dprofile_control_utils_test.cpp79 std::shared_ptr<IKVAdapter> kvStore = nullptr; in HWTEST_F() local
82 int32_t ret = profileControlUtils->PutDeviceProfile(kvStore, deviceProfile); in HWTEST_F()
94 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, in HWTEST_F() local
100 int32_t ret = profileControlUtils->PutDeviceProfile(kvStore, deviceProfile); in HWTEST_F()
112 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, in HWTEST_F() local
120 int32_t ret = profileControlUtils->PutDeviceProfile(kvStore, deviceProfile); in HWTEST_F()
132 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, in HWTEST_F() local
152 int32_t ret = profileControlUtils->PutDeviceProfile(kvStore, deviceProfile1); in HWTEST_F()
164 std::shared_ptr<IKVAdapter> kvStore = nullptr; in HWTEST_F() local
167 int32_t ret = profileControlUtils->PutServiceProfile(kvStore, serviceProfil in HWTEST_F()
179 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, HWTEST_F() local
198 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, HWTEST_F() local
217 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, HWTEST_F() local
238 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, HWTEST_F() local
261 std::shared_ptr<IKVAdapter> kvStore = nullptr; HWTEST_F() local
276 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, HWTEST_F() local
294 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, HWTEST_F() local
312 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, HWTEST_F() local
332 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, HWTEST_F() local
352 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, HWTEST_F() local
372 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, HWTEST_F() local
394 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, HWTEST_F() local
726 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, HWTEST_F() local
745 std::shared_ptr<IKVAdapter> kvStore = nullptr; HWTEST_F() local
762 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, HWTEST_F() local
782 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, HWTEST_F() local
802 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, HWTEST_F() local
825 std::shared_ptr<IKVAdapter> kvStore = nullptr; HWTEST_F() local
843 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, HWTEST_F() local
864 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, HWTEST_F() local
885 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, HWTEST_F() local
907 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, HWTEST_F() local
930 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, HWTEST_F() local
955 std::shared_ptr<IKVAdapter> kvStore = nullptr; HWTEST_F() local
975 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, HWTEST_F() local
998 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, HWTEST_F() local
1021 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, HWTEST_F() local
1044 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, HWTEST_F() local
1070 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, HWTEST_F() local
1095 std::shared_ptr<IKVAdapter> kvStore = std::make_shared<KVAdapter>(APP_ID, STORE_ID, HWTEST_F() local
[all...]
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/unittest/common/interfaces/
H A Ddistributeddb_interfaces_encrypt_database_test.cpp121 KvStoreDelegate *kvStore = nullptr; in CheckRekeyWithExistedSnapshot() local
123 placeholders::_2, std::ref(status), std::ref(kvStore)); in CheckRekeyWithExistedSnapshot()
129 ASSERT_TRUE(kvStore != nullptr); in CheckRekeyWithExistedSnapshot()
137 kvStore->GetKvStoreSnapshot(nullptr, snapshotDelegateCallback); in CheckRekeyWithExistedSnapshot()
147 EXPECT_EQ(kvStore->Rekey(passwd), BUSY); in CheckRekeyWithExistedSnapshot()
151 EXPECT_EQ(kvStore->ReleaseKvStoreSnapshot(snapshot), OK); in CheckRekeyWithExistedSnapshot()
156 EXPECT_EQ(kvStore->Rekey(passwd), OK); in CheckRekeyWithExistedSnapshot()
157 EXPECT_EQ(g_mgr.CloseKvStore(kvStore), OK); in CheckRekeyWithExistedSnapshot()
164 KvStoreDelegate *kvStore = nullptr; in CheckRekeyWithExistedObserver() local
166 placeholders::_2, std::ref(status), std::ref(kvStore)); in CheckRekeyWithExistedObserver()
358 KvStoreDelegate *kvStore = nullptr; HWTEST_F() local
437 KvStoreNbDelegate *kvStore = nullptr; HWTEST_F() local
492 KvStoreNbDelegate *kvStore = nullptr; HWTEST_F() local
538 KvStoreNbDelegate *kvStore = nullptr; HWTEST_F() local
[all...]
/foundation/distributeddatamgr/kv_store/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/
H A Dlocal_subscribe_store_test.cpp37 static std::shared_ptr<SingleKvStore> kvStore; member in LocalSubscribeStoreTest
42 std::shared_ptr<SingleKvStore> LocalSubscribeStoreTest::kvStore = nullptr; member in LocalSubscribeStoreTest
55 manager.CloseKvStore(appId, kvStore); in TearDownTestCase()
56 kvStore = nullptr; in TearDownTestCase()
76 statusGetKvStore = manager.GetSingleKvStore(options, appId, storeId, kvStore); in SetUp()
78 EXPECT_NE(nullptr, kvStore) << "kvStore is nullptr"; in SetUp()
83 manager.CloseKvStore(appId, kvStore); in TearDown()
84 kvStore = nullptr; in TearDown()
174 Status status = kvStore in HWTEST_F()
[all...]
H A Ddistributed_kv_data_manager_test.cpp310 std::shared_ptr<SingleKvStore> kvStore = nullptr; in HWTEST_F() local
313 Status status = manager.GetSingleKvStore(options, appId, storeId64, kvStore); in HWTEST_F()
317 status = manager.GetSingleKvStore(options, appId, storeId64, kvStore); in HWTEST_F()
319 EXPECT_NE(kvStore, nullptr); in HWTEST_F()
323 status = manager.GetSingleKvStore(options, appId, storeId64, kvStore); in HWTEST_F()
325 EXPECT_EQ(kvStore, nullptr); in HWTEST_F()
379 std::shared_ptr<SingleKvStore> kvStore; in HWTEST_F() local
380 Status status = manager.GetSingleKvStore(create, appId, id1, kvStore); in HWTEST_F()
381 ASSERT_NE(kvStore, nullptr); in HWTEST_F()
383 status = manager.GetSingleKvStore(create, appId, id2, kvStore); in HWTEST_F()
423 std::shared_ptr<SingleKvStore> kvStore; HWTEST_F() local
442 std::shared_ptr<SingleKvStore> kvStore; HWTEST_F() local
593 std::shared_ptr<SingleKvStore> kvStore; HWTEST_F() local
620 std::shared_ptr<SingleKvStore> kvStore; HWTEST_F() local
642 std::shared_ptr<SingleKvStore> kvStore; HWTEST_F() local
[all...]
/foundation/deviceprofile/device_info_manager/services/core/include/utils/
H A Dprofile_control_utils.h32 static int32_t PutDeviceProfile(std::shared_ptr<IKVAdapter> kvStore, const DeviceProfile& deviceProfile);
33 static int32_t PutServiceProfile(std::shared_ptr<IKVAdapter> kvStore, const ServiceProfile& serviceProfile);
34 static int32_t PutServiceProfileBatch(std::shared_ptr<IKVAdapter> kvStore,
36 static int32_t PutCharacteristicProfile(std::shared_ptr<IKVAdapter> kvStore,
40 static int32_t PutCharacteristicProfileBatch(std::shared_ptr<IKVAdapter> kvStore,
44 static int32_t GetDeviceProfile(std::shared_ptr<IKVAdapter> kvStore, const std::string& deviceId,
46 static int32_t GetServiceProfile(std::shared_ptr<IKVAdapter> kvStore, const std::string& deviceId,
48 static int32_t GetCharacteristicProfile(std::shared_ptr<IKVAdapter> kvStore, const std::string& deviceId,
52 static int32_t DeleteServiceProfile(std::shared_ptr<IKVAdapter> kvStore, const std::string& deviceId,
54 static int32_t DeleteCharacteristicProfile(std::shared_ptr<IKVAdapter> kvStore, cons
[all...]
/foundation/distributeddatamgr/kv_store/test/unittest/distributeddata/
H A DSchemaJsTest.js22 var kvStore = null; variable
42 kvStore = store;
49 kvStore.on('dataChange', 0, function (data) {
54 kvStore.putBatch(entries).then((data) => {
70 await kvStore.getEntries(query).then((entries) => {
124 kvStore = null;
135 await kvManager.closeKVStore(TEST_BUNDLE_NAME, TEST_STORE_ID, kvStore).then(async () => {
145 kvStore = null;
240 kvStore = store;
242 await kvStore
[all...]
H A DSingleKvStoreDataCallbackJsTest.js33 var kvStore = null; variable
88 kvStore = null;
95 kvStore = store;
103 await kvManager.closeKVStore(TEST_BUNDLE_NAME, TEST_STORE_ID, kvStore, async function (err, data) {
110 kvStore = null;
122 await kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, function (err,data) {
151 await kvStore.put(KEY_TEST_STRING_ELEMENT+'102', str, async function (err,data) {
154 await kvStore.get(KEY_TEST_STRING_ELEMENT+'102', function (err,data) {
176 await kvStore.get(KEY_TEST_STRING_ELEMENT, function (err,data) {
201 await kvStore
[all...]
H A DDeviceKvStoreDataCallbackJsTest.js35 var kvStore = null; variable
88 kvStore = store;
94 kvStore.on('dataChange', 0, function (data) {
98 kvStore.put("getDeviceId", "byPut").then((data) => {
113 await kvManager.closeKVStore(TEST_BUNDLE_NAME, TEST_STORE_ID, kvStore);
115 kvStore = null;
123 kvStore = null;
130 kvStore = store;
138 await kvManager.closeKVStore(TEST_BUNDLE_NAME, TEST_STORE_ID, kvStore, async function (err, data) {
145 kvStore
[all...]
H A DSingleKvStoreDataPromiseJsTest.js33 var kvStore = null; variable
91 kvStore = null;
98 kvStore = store;
109 await kvManager.closeKVStore(TEST_BUNDLE_NAME, TEST_STORE_ID, kvStore).then(async () => {
119 kvStore = null;
132 await kvStore.put(KEY_TEST_STRING_ELEMENT, null).then((data) => {
154 await kvStore.put(KEY_TEST_STRING_ELEMENT, '').then((data) => {
177 await kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT).then((data) => {
204 await kvStore.put(KEY_TEST_STRING_ELEMENT, str).then(async (data) => {
207 await kvStore
[all...]
H A DDeviceKvStoreDataPromiseJsTest.js35 var kvStore = null; variable
88 kvStore = store;
94 kvStore.on('dataChange', 0, function (data) {
98 kvStore.put("getDeviceId", "byPut").then((data) => {
113 await kvManager.closeKVStore(TEST_BUNDLE_NAME, TEST_STORE_ID, kvStore);
115 kvStore = null;
123 kvStore = null;
130 kvStore = store;
141 await kvManager.closeKVStore(TEST_BUNDLE_NAME, TEST_STORE_ID, kvStore).then(async () => {
151 kvStore
[all...]
/foundation/deviceprofile/device_info_manager/services/core/src/utils/
H A Dprofile_control_utils.cpp32 int32_t ProfileControlUtils::PutDeviceProfile(std::shared_ptr<IKVAdapter> kvStore, const DeviceProfile& deviceProfile) in PutDeviceProfile() argument
35 if (kvStore == nullptr) { in PutDeviceProfile()
36 HILOGE("kvStore is nullptr!"); in PutDeviceProfile()
49 if (kvStore->PutBatch(entries) != DP_SUCCESS) { in PutDeviceProfile()
57 int32_t ProfileControlUtils::PutServiceProfile(std::shared_ptr<IKVAdapter> kvStore, in PutServiceProfile() argument
61 if (kvStore == nullptr) { in PutServiceProfile()
62 HILOGE("kvStore is nullptr!"); in PutServiceProfile()
75 if (kvStore->PutBatch(entries) != DP_SUCCESS) { in PutServiceProfile()
83 int32_t ProfileControlUtils::PutServiceProfileBatch(std::shared_ptr<IKVAdapter> kvStore, in PutServiceProfileBatch() argument
92 int32_t putServiceResult = PutServiceProfile(kvStore, serviceProfil in PutServiceProfileBatch()
102 PutCharacteristicProfile(std::shared_ptr<IKVAdapter> kvStore, const CharacteristicProfile& charProfile) PutCharacteristicProfile() argument
204 PutCharacteristicProfileBatch(std::shared_ptr<IKVAdapter> kvStore, const std::vector<CharacteristicProfile>& charProfiles) PutCharacteristicProfileBatch() argument
223 GetDeviceProfile(std::shared_ptr<IKVAdapter> kvStore, const std::string& deviceId, DeviceProfile& deviceProfile) GetDeviceProfile() argument
255 GetServiceProfile(std::shared_ptr<IKVAdapter> kvStore, const std::string& deviceId, const std::string& serviceName, ServiceProfile& serviceProfile) GetServiceProfile() argument
288 GetCharacteristicProfile(std::shared_ptr<IKVAdapter> kvStore, const std::string& deviceId, const std::string& serviceName, const std::string& characteristicKey, CharacteristicProfile& charProfile) GetCharacteristicProfile() argument
414 DeleteServiceProfile(std::shared_ptr<IKVAdapter> kvStore, const std::string& deviceId, const std::string& serviceName) DeleteServiceProfile() argument
439 DeleteCharacteristicProfile(std::shared_ptr<IKVAdapter> kvStore, const std::string& deviceId, const std::string& serviceName, const std::string& characteristicKey) DeleteCharacteristicProfile() argument
471 GetAllDeviceProfile(std::shared_ptr<IKVAdapter> kvStore, std::vector<DeviceProfile>& deviceProfiles) GetAllDeviceProfile() argument
499 GetAllServiceProfile(std::shared_ptr<IKVAdapter> kvStore, std::vector<ServiceProfile>& serviceProfiles) GetAllServiceProfile() argument
527 GetAllCharacteristicProfile(std::shared_ptr<IKVAdapter> kvStore, std::vector<CharacteristicProfile>& charProfiles) GetAllCharacteristicProfile() argument
[all...]
/foundation/distributeddatamgr/kv_store/test/unittest/distributedKVStore/
H A DSingleKvStoreKVCallbackJsTest.js37 var kvStore = null; variable
85 kvStore = null;
92 kvStore = store;
105 kvStore = null;
124 kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, function (err, data) {
149 kvStore.put(KEY_TEST_STRING_ELEMENT, function (err, data) {
177 kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, function (err) {
204 kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, function (err) {
207 kvStore.get(KEY_TEST_STRING_ELEMENT, function (err, data) {
228 kvStore
[all...]
H A DSchemaJsTest.js25 var kvStore = null; variable
57 kvStore = null;
68 await kvManager.closeKVStore(TEST_BUNDLE_NAME, TEST_STORE_ID, kvStore).then(async () => {
78 kvStore = null;
104 kvStore = store;
106 await kvStore.put("test_key_1", '{"name":1}');
107 await kvStore.put("test_key_2", '{"name":2}');
108 await kvStore.put("test_key_3", '{"name":3}');
115 await kvStore.getEntries(query).then((entries) => {
151 kvStore
[all...]
H A DDeviceKvStoreKVCallbackJsTest.js37 var kvStore = null; variable
82 kvStore = store;
88 kvStore.on('dataChange', 0, function (data) {
92 kvStore.put("getDeviceId", "byPut").then((data) => {
109 kvStore = null;
117 kvStore = null;
129 kvStore = store;
150 kvStore = null;
169 kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, function (err, data) {
194 kvStore
[all...]
H A DSingleKvStoreKVPromiseJsTest.js39 var kvStore = null; variable
89 kvStore = null;
95 kvStore = store;
111 kvStore = null;
126 await kvStore.put(KEY_TEST_STRING_ELEMENT, null).then((data) => {
156 await kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT).then((data) => {
179 await kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT).then((data) => {
202 await kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT).then(async (data) => {
204 await kvStore.get(KEY_TEST_STRING_ELEMENT).then((data) => {
226 await kvStore
[all...]
H A DDeviceKvStoreKVPromiseJsTest.js39 var kvStore = null; variable
84 kvStore = store;
90 kvStore.on('dataChange', 0, function (data) {
94 kvStore.put("getDeviceId", "byPut").then((data) => {
111 kvStore = null;
119 kvStore = null;
126 kvStore = store;
142 kvStore = null;
157 await kvStore.put(KEY_TEST_STRING_ELEMENT, null).then((data) => {
187 await kvStore
[all...]
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/test/
H A Dkvdb_service_impl_test.cpp68 std::shared_ptr<SingleKvStore> kvStore; member in OHOS::Test::DistributedDataTest::KvdbServiceImplTest
151 Status status = manager.GetSingleKvStore(create, appId, id1, kvStore); in HWTEST_F()
152 EXPECT_NE(kvStore, nullptr); in HWTEST_F()
194 Status status = manager.GetSingleKvStore(create, appId, id1, kvStore); in HWTEST_F()
195 ASSERT_NE(kvStore, nullptr); in HWTEST_F()
197 status = manager.GetSingleKvStore(create, appId, id2, kvStore); in HWTEST_F()
198 ASSERT_NE(kvStore, nullptr); in HWTEST_F()
200 status = manager.GetSingleKvStore(create, appId, id3, kvStore); in HWTEST_F()
201 ASSERT_NE(kvStore, nullptr); in HWTEST_F()
233 Status status1 = manager.GetSingleKvStore(create, appId, storeId, kvStore); in HWTEST_F()
[all...]
/foundation/distributeddatamgr/kv_store/frameworks/jskitsimpl/distributeddata/src/
H A Djs_single_kv_store.cpp91 auto& kvStore = reinterpret_cast<JsSingleKVStore*>(ctxt->native)->GetNative(); in Get()
93 Status status = kvStore->Get(key, value); in Get()
94 ZLOGD("kvStore->Get return %{public}d", status); in Get()
97 CHECK_STATUS_RETURN_VOID(ctxt, "kvStore->Get() failed!"); in Get()
171 auto& kvStore = reinterpret_cast<JsSingleKVStore*>(ctxt->native)->GetNative(); in GetEntries()
175 status = kvStore->GetEntries(keyPrefix, ctxt->entries); in GetEntries()
176 ZLOGD("kvStore->GetEntries() return %{public}d", status); in GetEntries()
179 status = kvStore->GetEntries(query, ctxt->entries); in GetEntries()
180 ZLOGD("kvStore->GetEntries() return %{public}d", status); in GetEntries()
183 CHECK_STATUS_RETURN_VOID(ctxt, "kvStore in GetEntries()
391 auto& kvStore = reinterpret_cast<JsSingleKVStore*>(ctxt->native)->GetNative(); Sync() local
473 JsSingleKVStore* kvStore = new (std::nothrow) JsSingleKVStore(storeId); New() local
[all...]
H A Djs_device_kv_store.cpp101 auto& kvStore = reinterpret_cast<JsDeviceKVStore*>(ctxt->native)->GetNative(); in Get()
102 if (kvStore == nullptr) { in Get()
103 ZLOGE("kvStore is nullptr"); in Get()
107 Status status = kvStore->Get(key, value); in Get()
108 CHECK_STATUS_RETURN_VOID(ctxt, "kvStore->result() failed!"); in Get()
109 ZLOGD("kvStore->Get return %{public}d", status); in Get()
112 CHECK_STATUS_RETURN_VOID(ctxt, "kvStore->Get() failed!"); in Get()
210 auto& kvStore = reinterpret_cast<JsDeviceKVStore*>(ctxt->native)->GetNative(); in GetEntries()
215 status = kvStore->GetEntries(keyPrefix, ctxt->entries); in GetEntries()
216 ZLOGD("kvStore in GetEntries()
445 auto& kvStore = reinterpret_cast<JsDeviceKVStore*>(ctxt->native)->GetNative(); Sync() local
468 JsDeviceKVStore* kvStore = new (std::nothrow) JsDeviceKVStore(storeId); New() local
[all...]
/foundation/distributeddatamgr/kv_store/frameworks/innerkitsimpl/kvdb/test/
H A Dsingle_store_impl_test.cpp169 std::shared_ptr<SingleKvStore> kvStore; in HWTEST_F() local
172 kvStore = CreateKVStore(storeId.storeId, DEVICE_COLLABORATION, false, true); in HWTEST_F()
173 ASSERT_NE(kvStore, nullptr); in HWTEST_F()
179 Status status = kvStore->Put(key, value); in HWTEST_F()
184 status = kvStore->Put(key1, value1); in HWTEST_F()
187 kvStore = nullptr; in HWTEST_F()
485 std::shared_ptr<SingleKvStore> kvStore; in HWTEST_F() local
488 kvStore = CreateKVStore(storeId.storeId, DEVICE_COLLABORATION, false, true); in HWTEST_F()
489 ASSERT_NE(kvStore, nullptr); in HWTEST_F()
498 auto status = kvStore in HWTEST_F()
529 std::shared_ptr<SingleKvStore> kvStore; HWTEST_F() local
1004 std::shared_ptr<SingleKvStore> kvStore; HWTEST_F() local
1374 std::shared_ptr<SingleKvStore> kvStore; HWTEST_F() local
1451 std::shared_ptr<SingleKvStore> kvStore; HWTEST_F() local
1475 std::shared_ptr<SingleKvStore> kvStore; HWTEST_F() local
1498 std::shared_ptr<SingleKvStore> kvStore; HWTEST_F() local
1522 std::shared_ptr<SingleKvStore> kvStore; HWTEST_F() local
1550 std::shared_ptr<SingleKvStore> kvStore; HWTEST_F() local
1575 std::shared_ptr<SingleKvStore> kvStore; HWTEST_F() local
1601 std::shared_ptr<SingleKvStore> kvStore; HWTEST_F() local
1628 std::shared_ptr<SingleKvStore> kvStore; HWTEST_F() local
1663 std::shared_ptr<SingleKvStore> kvStore; HWTEST_F() local
1699 std::shared_ptr<SingleKvStore> kvStore; HWTEST_F() local
1736 std::shared_ptr<SingleKvStore> kvStore; HWTEST_F() local
1782 std::shared_ptr<SingleKvStore> kvStore; HWTEST_F() local
[all...]
/foundation/distributeddatamgr/kv_store/kvstoremock/frameworks/innerkitsimpl/kvdb/src/
H A Dstore_manager.cpp40 auto kvStore = StoreFactory::GetInstance().GetOrOpenStore(appId, storeId, options, status, isCreate); in GetKVStore() local
46 return kvStore; in GetKVStore()
59 Status StoreManager::CloseKVStore(const AppId &appId, std::shared_ptr<SingleKvStore> &kvStore) in CloseKVStore() argument
61 if (!appId.IsValid() || kvStore == nullptr) { in CloseKVStore()
65 StoreId storeId { kvStore->GetStoreId() }; in CloseKVStore()
66 kvStore = nullptr; in CloseKVStore()
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/interfaces/src/
H A Dkv_store_delegate_manager.cpp224 auto kvStore = new (std::nothrow) KvStoreDelegateImpl(conn, storeId); in GetKvStore() local
225 if (kvStore == nullptr) { in GetKvStore()
232 callback(OK, kvStore); in GetKvStore()
239 DBStatus KvStoreDelegateManager::SetObserverNotifier(KvStoreNbDelegate *kvStore, in SetObserverNotifier() argument
244 status = kvStore->RegisterObserver(option.key, option.mode, option.observer); in SetObserverNotifier()
251 status = kvStore->SetConflictNotifier(option.conflictType, option.notifier); in SetObserverNotifier()
345 auto kvStore = new (std::nothrow) KvStoreNbDelegateImpl(conn, storeId); in GetKvStore() local
346 if (kvStore == nullptr) { in GetKvStore()
353 status = SetObserverNotifier(kvStore, tmpOption); in GetKvStore()
355 CloseKvStore(kvStore); in GetKvStore()
369 CloseKvStore(KvStoreDelegate *kvStore) CloseKvStore() argument
392 CloseKvStore(KvStoreNbDelegate *kvStore) CloseKvStore() argument
[all...]
/foundation/distributeddatamgr/kv_store/frameworks/innerkitsimpl/kvdb/src/
H A Dstore_factory.cpp63 std::shared_ptr<SingleStoreImpl> kvStore; in GetOrOpenStore() local
67 kvStore = stores[storeId]; in GetOrOpenStore()
68 kvStore->AddRef(); in GetOrOpenStore()
78 ZLOGE("Crypt kvStore failed to get password, storeId is %{public}s, error is %{public}d", in GetOrOpenStore()
95 [this, &dbManager, &kvStore, &appId, &dbStatus, &options](auto status, auto *store) { in GetOrOpenStore()
104 kvStore = std::make_shared<SingleStoreImpl>(dbStore, appId, options, convertor); in GetOrOpenStore()
107 if (kvStore == nullptr) { in GetOrOpenStore()
113 stores[storeId] = kvStore; in GetOrOpenStore()
114 KvStoreServiceDeathNotifier::AddServiceDeathWatcher(kvStore); in GetOrOpenStore()
117 return kvStore; in GetOrOpenStore()
210 DBStore *kvStore; ReKey() local
[all...]

Completed in 15 milliseconds

123