Home
last modified time | relevance | path

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

/foundation/distributeddatamgr/relational_store/frameworks/native/rdb/src/
H A Drdb_local_db_observer.cpp48 RdbStoreObserver::PrimaryKey primaryKey; in Convert() local
49 RawDataParser::Convert(std::move(primary[0]), primaryKey); in Convert() local
50 changeInfo[dataInfo.tableName][changeType].push_back(std::move(primaryKey)); in Convert()
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/interfaces/src/relational/
H A Drelational_store_manager.cpp182 DB_API std::vector<uint8_t> RelationalStoreManager::CalcPrimaryKeyHash(const std::map<std::string, Type> &primaryKey, in CalcPrimaryKeyHash() argument
186 if (primaryKey.empty()) { in CalcPrimaryKeyHash()
187 LOGW("primaryKey is empty"); in CalcPrimaryKeyHash()
192 if (primaryKey.size() == 1) { in CalcPrimaryKeyHash()
193 auto iter = primaryKey.begin(); in CalcPrimaryKeyHash()
198 errCode = CloudStorageUtils::CalculateHashKeyForOneField(field, primaryKey, false, collateType, result); in CalcPrimaryKeyHash()
206 for (const auto &item : primaryKey) { // we sort by upper case name in log table when calculate hash in CalcPrimaryKeyHash()
216 errCode = CloudStorageUtils::CalculateHashKeyForOneField(field, primaryKey, false, collateType, temp); in CalcPrimaryKeyHash()
H A Drelational_store_sqlite_ext.cpp791 std::string GetInsertTrigger(const std::string &tableName, bool isRowid, const std::string &primaryKey) in GetInsertTrigger() argument
797 if (isRowid || primaryKey.empty()) { // LCOV_EXCL_BR_LINE in GetInsertTrigger()
802 insertTrigger += "NEW." + primaryKey + ", 0);\n"; in GetInsertTrigger()
808 std::string GetUpdateTrigger(const std::string &tableName, bool isRowid, const std::string &primaryKey) in GetUpdateTrigger() argument
814 if (isRowid || primaryKey.empty()) { // LCOV_EXCL_BR_LINE in GetUpdateTrigger()
819 updateTrigger += "NEW." + primaryKey + ", 1);\n"; in GetUpdateTrigger()
825 std::string GetDeleteTrigger(const std::string &tableName, bool isRowid, const std::string &primaryKey) in GetDeleteTrigger() argument
831 if (isRowid || primaryKey.empty()) { // LCOV_EXCL_BR_LINE in GetDeleteTrigger()
836 deleteTrigger += "OLD." + primaryKey + ", 2);\n"; in GetDeleteTrigger()
842 int GetPrimaryKeyName(sqlite3 *db, const std::string &tableName, std::string &primaryKey) in GetPrimaryKeyName() argument
870 std::string primaryKey = ""; GetTriggerSqls() local
[all...]
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/src/sqlite/
H A Dsqlite_log_table_manager.cpp49 std::string primaryKey = GetPrimaryKeySql(table); in CreateRelationalLogTable() local
65 primaryKey + ");"; in CreateRelationalLogTable()
83 const std::string primaryKey = "PRIMARY KEY(userid, hash_key)"; in CreateKvSyncLogTable() local
90 primaryKey + ");"; in CreateKvSyncLogTable()
/foundation/distributeddatamgr/data_object/frameworks/innerkitsimpl/src/
H A Dobject_types_util.cpp22 return ITypesUtil::Marshal(data, input.storeName, input.tableName, input.primaryKey, input.field, in Marshalling()
28 return ITypesUtil::Unmarshal(data, output.storeName, output.tableName, output.primaryKey, output.field, in Unmarshalling()
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/object/
H A Dobject_types_utils.cpp22 return ITypesUtil::Unmarshal(data, output.storeName, output.tableName, output.primaryKey, output.field, in Unmarshalling()
H A Dobject_asset_machine.cpp232 for (auto const& [key, value] : bindInfo.primaryKey) { in BuildSql()
242 for (auto const& [key, primary] : assetBindInfo.primaryKey) { in MergeAssetData()
360 bindEventInfo.primaryKey = changedAsset.bindInfo.primaryKey; in MakeBindInfo()
H A Dobject_manager.cpp1199 .primaryKey = ValueProxy::Convert(std::move(bindInfo.primaryKey)), in ConvertBindInfo()
/foundation/distributeddatamgr/relational_store/interfaces/ndk/src/
H A Drelational_store_impl.h56 std::vector<RdbStoreObserver::PrimaryKey> &primaryKey);
58 int32_t GetKeyDataType(std::vector<RdbStoreObserver::PrimaryKey> &primaryKey);
H A Drelational_store.cpp1018 int32_t NDKStoreObserver::GetKeyDataType(std::vector<RdbStoreObserver::PrimaryKey> &primaryKey) in GetKeyDataType() argument
1020 if (primaryKey.size() == 0) { in GetKeyDataType()
1023 if (std::holds_alternative<int64_t>(primaryKey[0]) || std::holds_alternative<double>(primaryKey[0])) { in GetKeyDataType()
1026 if (std::holds_alternative<std::string>(primaryKey[0])) { in GetKeyDataType()
1087 Rdb_KeyInfo::Rdb_KeyData *keyInfoData, std::vector<RdbStoreObserver::PrimaryKey> &primaryKey) in ConvertKeyInfoData()
1089 if (keyInfoData == nullptr || primaryKey.empty()) { in ConvertKeyInfoData()
1094 for (size_t i = 0; i < primaryKey.size(); ++i) { in ConvertKeyInfoData()
1095 const auto &key = primaryKey[i]; in ConvertKeyInfoData()
1086 ConvertKeyInfoData( Rdb_KeyInfo::Rdb_KeyData *keyInfoData, std::vector<RdbStoreObserver::PrimaryKey> &primaryKey) ConvertKeyInfoData() argument
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/test/
H A Dobject_asset_machine_test.cpp63 .primaryKey = vBucket, in SetUp()
202 .primaryKey = {{ "key_" + timestamp, "value_" + timestamp }}, in HWTEST_F()
246 .primaryKey = {{ "006", "006" }}, in HWTEST_F()
H A Dobject_snapshot_test.cpp58 .primaryKey = vBucket, in SetUp()
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/framework/include/snapshot/
H A Dmachine_status.h49 DistributedData::VBucket primaryKey; member
H A Dbind_event.h40 VBucket primaryKey; member
/foundation/distributeddatamgr/data_object/interfaces/innerkits/
H A Dobject_types.h27 CommonType::ValuesBucket primaryKey; member
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/fuzztest/relationalstoremanager_fuzzer/
H A Drelationalstoremanager_fuzzer.cpp140 std::map<std::string, Type> primaryKey = {{ key, key }}; in CombineTest() local
143 g_mgr.CalcPrimaryKeyHash(primaryKey, collateTypeMap); in CombineTest()
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/interfaces/include/relational/
H A Drelational_store_manager.h34 DB_API static std::vector<uint8_t> CalcPrimaryKeyHash(const std::map<std::string, Type> &primaryKey,
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/common/src/relational/
H A Dtable_info.cpp693 std::string primaryKey; in ToTableInfoString() local
695 primaryKey += "\"" + item.second + "\","; in ToTableInfoString()
697 primaryKey.pop_back(); // remove the last comma in ToTableInfoString()
698 attrStr += R"("PRIMARY_KEY": [)" + primaryKey + "]"; in ToTableInfoString()
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/src/sqlite/relational/
H A Dcloud_sync_log_table_manager.cpp83 auto primaryKey = table.GetPrimaryKey(); in GetPrimaryKeySql() local
84 if (primaryKey[0] == CloudDbConstant::ROW_ID_FIELD_NAME) { in GetPrimaryKeySql()
H A Dsqlite_single_ver_relational_storage_extend_executor.cpp621 std::string primaryKey = ", PRIMARY KEY ("; in CreateSharedTable() local
626 primaryKey += CloudDbConstant::CLOUD_OWNER; in CreateSharedTable()
633 primaryKey += ", " + field.colName; in CreateSharedTable()
638 createTableSql += primaryKey + ")"; in CreateSharedTable()
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/unittest/common/storage/
H A Ddistributeddb_sqlite_utils_test.cpp255 const std::string primaryKey = "PRIMARY KEY(userid, hash_key)"; in HWTEST_F() local
261 primaryKey + ");"; in HWTEST_F()
H A Ddistributeddb_relational_cloud_syncable_storage_test.cpp1260 std::map<std::string, Type> primaryKey = {{"name", name}}; in HWTEST_F() local
1264 std::vector<uint8_t> result = RelationalStoreManager::CalcPrimaryKeyHash(primaryKey, collateType); in HWTEST_F()
1312 std::map<std::string, Type> primaryKey = {{"id", id}}; in HWTEST_F() local
1317 std::vector<uint8_t> result = RelationalStoreManager::CalcPrimaryKeyHash(primaryKey, collateType); in HWTEST_F()
/foundation/distributeddatamgr/data_object/frameworks/jskitsimpl/test/unittest/src/
H A DObjectStoreJsunitV9.test.js849 primaryKey:{
906 primaryKey: {"data1": 123},
954 primaryKey:{"data1": 123},
/foundation/distributeddatamgr/data_object/frameworks/jskitsimpl/src/common/
H A Djs_util.cpp186 status = GetNamedProperty(env, in, "primaryKey", bindInfo.primaryKey); in GetValue()
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/rdb/
H A Drdb_service_impl.cpp514 for (auto& [key, value] : bindInfo.primaryKey) {

Completed in 24 milliseconds