Lines Matching refs:store
83 std::shared_ptr<OHOS::NativeRdb::RdbStore> store = nullptr;
85 store = profileDataBase_->store_;
88 store = contactsDataBase_->contactStore_;
91 if (store == nullptr) {
92 HILOG_ERROR("SyncUpdateAccount isProfile values is %{public}d this database store ponit is null", isProfile);
96 std::vector<AccountDataCollection> accounts = g_contactsAccount->GetAccountFromLocal(store);
110 store->BeginTransaction();
112 g_contactsAccount->StopForegin(store);
113 store->Commit();
115 int accountId = g_contactsAccount->GetNotExistAccount(store, notInSysAccounts[i]);
117 ClearData(store, accountId);
121 g_contactsAccount->Insert(store, shouldAddAccounts[i].name_, shouldAddAccounts[i].uid_);
122 store->Commit();
124 g_contactsAccount->OpenForegin(store);
125 store->Commit();
129 int AccountSync::ClearData(std::shared_ptr<OHOS::NativeRdb::RdbStore> store, int accountId)
134 int needDeleteRawContactId = contactsRawContact.GetDeleteRawContactIdByAccountId(store, accountId);
137 int needDeleteContactId = contactsRawContact.GetDeleteContactIdByAccountId(store, accountId);
139 g_contactsAccount->DeleteDataByRawId(store, needDeleteRawContactId);
140 int ret = store->Commit();
142 contactsRawContact.DeleteRawcontactByRawId(store, needDeleteRawContactId);
143 ret = store->Commit();
145 contactsContact.DeleteContactById(store, needDeleteContactId);
146 ret = store->Commit();
148 g_contactsAccount->DeleteGroupsByAccountId(store, accountId);
149 ret = store->Commit();
151 g_contactsAccount->DeleteAccountByAccountId(store, accountId);
152 ret = store->Commit();