/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/unittest/common/interfaces/ |
H A D | distributeddb_cloud_interfaces_set_cloud_schema_test.cpp | 430 tableSchema = { 436 tableSchema = { 449 tableSchema = { 455 tableSchema = { 484 tableSchema = { 497 tableSchema = { 503 tableSchema = { 527 tableSchema = { 556 tableSchema = { 569 tableSchema = { [all …]
|
H A D | distributeddb_cloud_interfaces_reference_test.cpp | 737 TableSchema tableSchema; in SetCloudSchema() local 742 tableSchema = { "sourceTable", "src_shared", { field1, field2, field3} }; in SetCloudSchema() 744 dbSchema.tables.push_back(tableSchema); in SetCloudSchema() 745 tableSchema = { "targetTable", "dst_shared", { field1, field2, field3} }; in SetCloudSchema() 746 dbSchema.tables.push_back(tableSchema); in SetCloudSchema()
|
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/common/src/ |
H A D | param_check_utils.cpp | 273 for (const auto &tableSchema : lowerSchema.tables) { in CheckSharedTableName() local 274 if (tableSchema.sharedTableName.empty()) { in CheckSharedTableName() 277 if (tableSchema.sharedTableName == tableSchema.name) { in CheckSharedTableName() 291 tableNames.insert(tableSchema.name); in CheckSharedTableName() 292 sharedTableNames.insert(tableSchema.sharedTableName); in CheckSharedTableName() 294 for (const auto &field : tableSchema.fields) { in CheckSharedTableName() 308 for (auto &tableSchema : schema.tables) { in TransferSchemaToLower() local 309 …std::transform(tableSchema.name.begin(), tableSchema.name.end(), tableSchema.name.begin(), ::tolow… in TransferSchemaToLower() 310 std::transform(tableSchema.sharedTableName.begin(), tableSchema.sharedTableName.end(), in TransferSchemaToLower() 311 tableSchema.sharedTableName.begin(), ::tolower); in TransferSchemaToLower() [all …]
|
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/src/sqlite/relational/ |
H A D | sqlite_single_ver_relational_storage_executor_extend.cpp | 149 std::string sql = "insert into " + tableSchema.name + "("; in GetInsertSqlForCloudSync() 150 for (const auto &field : tableSchema.fields) { in GetInsertSqlForCloudSync() 155 for (size_t i = 0; i < tableSchema.fields.size(); i++) { in GetInsertSqlForCloudSync() 182 tableSchema, localTable, pkMap, allowEmpty); in GetPrimaryKeyHashValue() 652 std::string sql = GetInsertSqlForCloudSync(tableSchema); in InsertCloudData() 905 std::string sql = "UPDATE " + tableSchema.name + " SET"; in GetUpdateSqlForCloudSync() 938 auto updateFields = GetUpdateField(vBucket, tableSchema); in GetUpdateDataTableStatement() 1120 const TableSchema &tableSchema, OpType opType) in OnlyUpdateLogTable() argument 1122 return UpdateLogRecord(vBucket, tableSchema, opType); in OnlyUpdateLogTable() 1222 tableSchema_ = tableSchema; in SetTableSchema() [all …]
|
H A D | sqlite_single_ver_relational_storage_executor.h | 131 int GetInfoByPrimaryKeyOrGid(const TableSchema &tableSchema, const VBucket &vBucket, 134 int PutCloudSyncData(const std::string &tableName, const TableSchema &tableSchema, 178 const TableSchema &tableSchema); 211 void SetTableSchema(const TableSchema &tableSchema); 290 int ExecutePutCloudData(const std::string &tableName, const TableSchema &tableSchema, 293 std::string GetInsertSqlForCloudSync(const TableSchema &tableSchema); 335 int BindValueToInsertLogStatement(VBucket &vBucket, const TableSchema &tableSchema, 346 int UpdateCloudData(VBucket &vBucket, const TableSchema &tableSchema); 355 int BindValueToUpdateLogStatement(const VBucket &vBucket, const TableSchema &tableSchema, 449 int UpdateAssetsIdForOneRecord(const TableSchema &tableSchema, const std::string &sql, [all …]
|
H A D | sqlite_single_ver_relational_storage_extend_executor.cpp | 634 for (const auto &field : tableSchema.fields) { in CreateSharedTable() 1261 for (const auto &field: tableSchema.fields) { in GetAssetsByGidOrHashKey() 1487 if (CloudStorageUtils::IsSharedTable(tableSchema)) { in OnlyUpdateAssetId() 1491 if (!IsNeedUpdateAssetId(tableSchema, dataKey, vBucket)) { in OnlyUpdateAssetId() 1494 int errCode = UpdateAssetId(tableSchema, dataKey, vBucket); in OnlyUpdateAssetId() 1647 for (const auto &field : tableSchema.fields) { in BindAssetFiledToBlobStatement() 1707 for (const auto &field : tableSchema.fields) { in UpdateAssetId() 1778 const TableSchema &tableSchema) in GetUpdateField() argument 1783 for (const auto &field : tableSchema.fields) { in GetUpdateField() 1786 fields = tableSchema.fields; in GetUpdateField() [all …]
|
H A D | sqlite_single_relational_storage_engine.cpp | 821 for (const auto &tableSchema : cloudSchema.tables) { in DoUpdateSharedTable() local 823 … errCode = CreateDistributedSharedTable(handle, tableSchema.name, tableSchema.sharedTableName, in DoUpdateSharedTable() 878 for (auto const &tableSchema : cloudSchema.tables) { in DoCreateSharedTable() local 879 if (tableSchema.sharedTableName.empty()) { in DoCreateSharedTable() 887 if (alterTableName.second == tableSchema.sharedTableName) { in DoCreateSharedTable() 895 int errCode = handle->CreateSharedTable(tableSchema); in DoCreateSharedTable() 899 … errCode = CreateDistributedSharedTable(handle, tableSchema.name, tableSchema.sharedTableName, in DoCreateSharedTable() 942 for (const auto &tableSchema : cloudSchema.tables) { in CheckIfExistUserTable() local 943 if (alterTableNames.find(tableSchema.sharedTableName) != alterTableNames.end()) { in CheckIfExistUserTable() 946 TableInfo tableInfo = schema.GetTable(tableSchema.sharedTableName); in CheckIfExistUserTable() [all …]
|
H A D | sqlite_single_ver_relational_continue_token.cpp | 199 void SQLiteSingleVerRelationalContinueToken::GetCloudTableSchema(TableSchema &tableSchema) const in GetCloudTableSchema() 201 tableSchema = tableSchema_; in GetCloudTableSchema()
|
H A D | sqlite_single_ver_relational_continue_token.h | 44 void GetCloudTableSchema(TableSchema &tableSchema) const;
|
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/src/cloud/ |
H A D | schema_mgr.cpp | 180 for (const auto &tableSchema : cloudSchema.tables) { in SetCloudDbSchema() local 181 if (tableSchema.name.empty() || tableSchema.sharedTableName.empty()) { in SetCloudDbSchema() 184 bool hasPrimaryKey = DBCommon::HasPrimaryKey(tableSchema.fields); in SetCloudDbSchema() 185 auto sharedTableFields = tableSchema.fields; in SetCloudDbSchema() 190 …TableSchema sharedTableSchema = { tableSchema.sharedTableName, tableSchema.sharedTableName, shared… in SetCloudDbSchema() 209 for (const TableSchema &tableSchema : cloudSchema_->tables) { in GetCloudTableSchema() local 210 if (DBCommon::CaseInsensitiveCompare(tableSchema.name, tableName)) { in GetCloudTableSchema() 211 retSchema = tableSchema; in GetCloudTableSchema() 226 for (const auto &tableSchema : (*cloudSchema_).tables) { in IsSharedTable() 227 if (DBCommon::CaseInsensitiveCompare(tableName, tableSchema.sharedTableName)) { in IsSharedTable()
|
H A D | cloud_storage_utils.cpp | 290 for (const auto &field : tableSchema.fields) { in GetCloudPrimaryKey() 301 for (const auto &item: tableSchema.fields) { in GetCloudAsset() 313 for (const auto &field : tableSchema.fields) { in GetCloudPrimaryKeyField() 330 for (const auto &field : tableSchema.fields) { in GetCloudPrimaryKeyFieldMap() 345 for (const auto &field: tableSchema.fields) { in GetAssetFieldsFromSchema() 364 for (const auto &field : tableSchema.fields) { in IsContainsPrimaryKey() 745 bool CloudStorageUtils::IsSharedTable(const TableSchema &tableSchema) in IsSharedTable() argument 747 return tableSchema.sharedTableName == tableSchema.name; in IsSharedTable() 1036 if (tableSchema.name != oldSchema.name) { in CheckCloudSchemaFields() 1040 auto it = std::find_if(tableSchema.fields.begin(), tableSchema.fields.end(), in CheckCloudSchemaFields() [all …]
|
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/include/cloud/ |
H A D | cloud_storage_utils.h | 51 static std::set<std::string> GetCloudPrimaryKey(const TableSchema &tableSchema); 52 …static std::vector<Field> GetCloudPrimaryKeyField(const TableSchema &tableSchema, bool sortByName … 53 static std::map<std::string, Field> GetCloudPrimaryKeyFieldMap(const TableSchema &tableSchema, 55 static bool IsContainsPrimaryKey(const TableSchema &tableSchema); 56 static std::vector<Field> GetCloudAsset(const TableSchema &tableSchema); 57 static int GetAssetFieldsFromSchema(const TableSchema &tableSchema, const VBucket &vBucket, 103 static void AddUpdateColForShare(const TableSchema &tableSchema, std::string &updateLogSql, 111 static bool IsSharedTable(const TableSchema &tableSchema); 116 …const TableSchema &tableSchema, const TableInfo &localTable, const std::map<std::string, Field> &p… 163 … static bool CheckCloudSchemaFields(const TableSchema &tableSchema, const TableSchema &oldSchema); [all …]
|
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/src/ |
H A D | storage_proxy.cpp | 241 TableSchema tableSchema; in GetCloudData() local 242 int errCode = store_->GetCloudTableSchema(querySyncObject.GetRelationTableName(), tableSchema); in GetCloudData() 269 TableSchema tableSchema; in GetCloudGid() local 270 int errCode = store_->GetCloudTableSchema(querySyncObject.GetRelationTableName(), tableSchema); in GetCloudGid() 274 …return store_->GetCloudGid(tableSchema, querySyncObject, isCloudForcePush, isCompensatedTask, clou… in GetCloudGid() 382 TableSchema tableSchema; in GetPrimaryColNamesWithAssetsFields() local 383 int ret = store_->GetCloudTableSchema(tableName, tableSchema); in GetPrimaryColNamesWithAssetsFields() 388 for (const auto &field : tableSchema.fields) { in GetPrimaryColNamesWithAssetsFields() 554 TableSchema tableSchema; in GetAssetsByGidOrHashKey() local 555 int errCode = store_->GetCloudTableSchema(tableName, tableSchema); in GetAssetsByGidOrHashKey() [all …]
|
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/fuzztest/cloudsync_fuzzer/ |
H A D | cloudsync_fuzzer.cpp | 117 TableSchema tableSchema = { in SetCloudDbSchema() local 121 dataBaseSchema.tables.push_back(tableSchema); in SetCloudDbSchema() 337 TableSchema tableSchema; in GetDataBaseSchema() local 338 … tableSchema.name = invalidSchema ? "invalid_schema_name" : CloudDbConstant::CLOUD_KV_TABLE_NAME; in GetDataBaseSchema() 343 tableSchema.fields.push_back(field); in GetDataBaseSchema() 346 tableSchema.fields.push_back(field); in GetDataBaseSchema() 348 tableSchema.fields.push_back(field); in GetDataBaseSchema() 350 tableSchema.fields.push_back(field); in GetDataBaseSchema() 353 tableSchema.fields.push_back(field); in GetDataBaseSchema() 354 schema.tables.push_back(tableSchema); in GetDataBaseSchema()
|
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/include/ |
H A D | icloud_sync_storage_interface.h | 104 virtual int GetCloudTableSchema(const TableName &tableName, TableSchema &tableSchema) = 0; 118 …virtual int GetCloudData(const TableSchema &tableSchema, const QuerySyncObject &object, const Time… 123 virtual int GetCloudGid(const TableSchema &tableSchema, const QuerySyncObject &querySyncObject, 177 …virtual std::pair<int, uint32_t> GetAssetsByGidOrHashKey(const TableSchema &tableSchema, const std… in GetAssetsByGidOrHashKey() argument
|
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/src/relational/ |
H A D | relational_sync_able_storage.cpp | 1117 token->SetCloudTableSchema(tableSchema); in GetCloudData() 1168 handle->SetTableSchema(tableSchema); in GetCloudGid() 1259 TableSchema tableSchema; in GetInfoByPrimaryKeyOrGidInner() local 1260 int errCode = GetCloudTableSchema(tableName, tableSchema); in GetInfoByPrimaryKeyOrGidInner() 1282 TableSchema tableSchema; in PutCloudSyncDataInner() local 1283 int errCode = GetCloudTableSchema(tableName, tableSchema); in PutCloudSyncDataInner() 1351 TableSchema tableSchema; in FillCloudAssetForDownload() local 1352 int errCode = GetCloudTableSchema(tableName, tableSchema); in FillCloudAssetForDownload() 1805 TableSchema tableSchema; in UpsertDataInTransaction() local 1819 tableSchema, localTable, pkMap, false); in UpsertDataInTransaction() [all …]
|
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/src/sqlite/ |
H A D | sqlite_cloud_kv_store.h | 38 int GetCloudTableSchema(const TableName &tableName, TableSchema &tableSchema) override; 52 …int GetCloudData(const TableSchema &tableSchema, const QuerySyncObject &object, const Timestamp &b… 57 …int GetCloudGid(const TableSchema &tableSchema, const QuerySyncObject &querySyncObject, bool isClo…
|
H A D | sqlite_cloud_kv_store.cpp | 70 TableSchema &tableSchema) in GetCloudTableSchema() argument 81 tableSchema = *it; in GetCloudTableSchema() 179 int SqliteCloudKvStore::GetCloudData(const TableSchema &tableSchema, const QuerySyncObject &object, in GetCloudData() argument 348 int SqliteCloudKvStore::GetCloudGid(const TableSchema &tableSchema, const QuerySyncObject &querySyn… in GetCloudGid() argument
|
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/unittest/common/syncer/cloud/ |
H A D | distributeddb_cloud_kv_syncer_test.cpp | 194 TableSchema tableSchema; in GetDataBaseSchema() local 195 tableSchema.name = invalidSchema ? "invalid_schema_name" : CloudDbConstant::CLOUD_KV_TABLE_NAME; in GetDataBaseSchema() 200 tableSchema.fields.push_back(field); in GetDataBaseSchema() 203 tableSchema.fields.push_back(field); in GetDataBaseSchema() 205 tableSchema.fields.push_back(field); in GetDataBaseSchema() 207 tableSchema.fields.push_back(field); in GetDataBaseSchema() 210 tableSchema.fields.push_back(field); in GetDataBaseSchema() 211 schema.tables.push_back(tableSchema); in GetDataBaseSchema()
|
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/unittest/common/storage/cloud/ |
H A D | distributeddb_cloud_assets_operation_sync_test.cpp | 186 TableSchema tableSchema; in GetSchema() local 187 tableSchema.name = tableName_; in GetSchema() 188 tableSchema.sharedTableName = tableName_ + "_shared"; in GetSchema() 189 tableSchema.fields = { in GetSchema() 194 schema.tables.push_back(tableSchema); in GetSchema() 976 TableSchema tableSchema; variable 977 tableSchema.name = deviceTableName; 978 tableSchema.sharedTableName = deviceTableName + "_shared"; 979 tableSchema.fields = { 984 dataBaseSchema.tables.push_back(tableSchema);
|
H A D | distributeddb_cloud_reference_sync_test.cpp | 146 TableSchema tableSchema; in GetSchema() local 147 tableSchema.name = parentTableName_; in GetSchema() 148 tableSchema.sharedTableName = sharedParentTableName_; in GetSchema() 149 tableSchema.fields = { in GetSchema() 160 schema.tables.push_back(tableSchema); in GetSchema() 169 TableSchema tableSchema; in GetSchema() local 170 tableSchema.name = table; in GetSchema() 171 tableSchema.sharedTableName = table + "_shared"; in GetSchema() 172 tableSchema.fields = { in GetSchema() 176 schema.tables.push_back(tableSchema); in GetSchema()
|
H A D | distributeddb_cloud_task_merge_test.cpp | 186 TableSchema tableSchema; in GetSchema() local 187 tableSchema.name = table; in GetSchema() 188 tableSchema.fields = { in GetSchema() 192 schema.tables.push_back(tableSchema); in GetSchema()
|
H A D | distributeddb_cloud_save_cloud_data_test.cpp | 84 TableSchema tableSchema; in SetCloudSchema() local 96 … tableSchema = { g_tableName, g_tableName + "_shared", { field1, field2, field3, field4, field5} }; in SetCloudSchema() 98 dbSchema.tables.push_back(tableSchema); in SetCloudSchema() 99 …tableSchema = { g_assetTableName, g_assetTableName + "_shared", { field1, field2, field3, field4, … in SetCloudSchema() 100 dbSchema.tables.push_back(tableSchema); in SetCloudSchema() 498 TableSchema tableSchema; in SetCloudSchemaForCollate() local 501 tableSchema = { g_tableName, g_tableName + "_shared", { field1, field2 } }; in SetCloudSchemaForCollate() 504 dbSchema.tables = { tableSchema }; in SetCloudSchemaForCollate()
|
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/unittest/common/syncer/ |
H A D | distributeddb_single_ver_multi_sub_user_test.cpp | 104 TableSchema tableSchema; in GetDataBaseSchema() local 105 tableSchema.name = CloudDbConstant::CLOUD_KV_TABLE_NAME; in GetDataBaseSchema() 110 tableSchema.fields.push_back(field); in GetDataBaseSchema() 113 tableSchema.fields.push_back(field); in GetDataBaseSchema() 115 tableSchema.fields.push_back(field); in GetDataBaseSchema() 117 tableSchema.fields.push_back(field); in GetDataBaseSchema() 120 tableSchema.fields.push_back(field); in GetDataBaseSchema() 121 schema.tables.push_back(tableSchema); in GetDataBaseSchema()
|
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/interfaces/src/relational/ |
H A D | relational_sync_able_storage.h | 149 …int GetCloudData(const TableSchema &tableSchema, const QuerySyncObject &object, const Timestamp &b… 154 …int GetCloudGid(const TableSchema &tableSchema, const QuerySyncObject &querySyncObject, bool isClo… 167 int GetCloudTableSchema(const TableName &tableName, TableSchema &tableSchema) override; 205 …std::pair<int, uint32_t> GetAssetsByGidOrHashKey(const TableSchema &tableSchema, const std::string…
|