/foundation/distributeddatamgr/relational_store/frameworks/native/rdb/src/ |
H A D | rdb_local_db_observer.cpp | 48 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 D | relational_store_manager.cpp | 182 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 D | relational_store_sqlite_ext.cpp | 791 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 D | sqlite_log_table_manager.cpp | 49 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 D | object_types_util.cpp | 22 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 D | object_types_utils.cpp | 22 return ITypesUtil::Unmarshal(data, output.storeName, output.tableName, output.primaryKey, output.field, in Unmarshalling()
|
H A D | object_asset_machine.cpp | 232 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 D | object_manager.cpp | 1199 .primaryKey = ValueProxy::Convert(std::move(bindInfo.primaryKey)),
in ConvertBindInfo()
|
/foundation/distributeddatamgr/relational_store/interfaces/ndk/src/ |
H A D | relational_store_impl.h | 56 std::vector<RdbStoreObserver::PrimaryKey> &primaryKey); 58 int32_t GetKeyDataType(std::vector<RdbStoreObserver::PrimaryKey> &primaryKey);
|
H A D | relational_store.cpp | 1018 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 D | object_asset_machine_test.cpp | 63 .primaryKey = vBucket, in SetUp() 202 .primaryKey = {{ "key_" + timestamp, "value_" + timestamp }}, in HWTEST_F() 246 .primaryKey = {{ "006", "006" }}, in HWTEST_F()
|
H A D | object_snapshot_test.cpp | 58 .primaryKey = vBucket, in SetUp()
|
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/framework/include/snapshot/ |
H A D | machine_status.h | 49 DistributedData::VBucket primaryKey; member
|
H A D | bind_event.h | 40 VBucket primaryKey; member
|
/foundation/distributeddatamgr/data_object/interfaces/innerkits/ |
H A D | object_types.h | 27 CommonType::ValuesBucket primaryKey; member
|
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/fuzztest/relationalstoremanager_fuzzer/ |
H A D | relationalstoremanager_fuzzer.cpp | 140 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 D | relational_store_manager.h | 34 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 D | table_info.cpp | 693 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 D | cloud_sync_log_table_manager.cpp | 83 auto primaryKey = table.GetPrimaryKey(); in GetPrimaryKeySql() local 84 if (primaryKey[0] == CloudDbConstant::ROW_ID_FIELD_NAME) { in GetPrimaryKeySql()
|
H A D | sqlite_single_ver_relational_storage_extend_executor.cpp | 621 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 D | distributeddb_sqlite_utils_test.cpp | 255 const std::string primaryKey = "PRIMARY KEY(userid, hash_key)"; in HWTEST_F() local 261 primaryKey + ");"; in HWTEST_F()
|
H A D | distributeddb_relational_cloud_syncable_storage_test.cpp | 1260 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 D | ObjectStoreJsunitV9.test.js | 849 primaryKey:{ 906 primaryKey: {"data1": 123}, 954 primaryKey:{"data1": 123},
|
/foundation/distributeddatamgr/data_object/frameworks/jskitsimpl/src/common/ |
H A D | js_util.cpp | 186 status = GetNamedProperty(env, in, "primaryKey", bindInfo.primaryKey); in GetValue()
|
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/rdb/ |
H A D | rdb_service_impl.cpp | 514 for (auto& [key, value] : bindInfo.primaryKey) {
|