/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/src/sqlite/relational/ |
H A D | sqlite_relational_database_upgrader.cpp | 128 TableInfo tableInfo = table.second; in UpgradeTrigger() local 129 tableInfo.SetTrackerTable(trackerSchemaObj.GetTrackerTable(table.first)); in UpgradeTrigger() 130 auto manager = LogTableManagerFactory::GetTableManager(mode, tableInfo.GetTableSyncType()); in UpgradeTrigger() 131 errCode = manager->AddRelationalLogTableTrigger(db_, tableInfo, ""); in UpgradeTrigger() 141 TableInfo tableInfo; in UpgradeTrigger() local 151 ret = manager->AddRelationalLogTableTrigger(db_, tableInfo, ""); in UpgradeTrigger() 191 TableInfo tableInfo; in UpgradeLogBaseOnVersion() local 192 tableInfo.SetTableName(logName); in UpgradeLogBaseOnVersion() 193 int errCode = SQLiteUtils::AnalysisSchemaFieldDefine(db_, logName, tableInfo); in UpgradeLogBaseOnVersion() 194 if (errCode == E_OK && tableInfo.Empty()) { in UpgradeLogBaseOnVersion() [all …]
|
H A D | sqlite_relational_store.cpp | 447 TableInfo tableInfo = localSchema.GetTable(tableName); in CreateDistributedTable() local 448 if (!tableInfo.Empty()) { in CreateDistributedTable() 449 bool isSharedTable = tableInfo.GetSharedTableMark(); in CreateDistributedTable() 500 for (const auto &tableInfo : tables) { in CleanCloudData() local 506 cloudTableNameList.push_back(tableInfo.first); in CleanCloudData() 1033 for (const auto &tableInfo : tableList) { in PrepareSharedTable() local 1034 if (!tableInfo.second.GetSharedTableMark()) { in PrepareSharedTable() 1222 if (!tableInfo.Empty()) { in CheckObjectValid() 1284 if (tableInfo.Empty()) { in SetTrackerTable() 1576 if (tableInfo.Empty()) { in CheckCloudSchema() [all …]
|
H A D | sqlite_relational_utils.cpp | 382 void SQLiteRelationalUtils::AddUpgradeSqlToList(const TableInfo &tableInfo, in AddUpgradeSqlToList() argument 386 auto it = tableInfo.GetFields().find(colName); in AddUpgradeSqlToList() 387 if (it != tableInfo.GetFields().end()) { in AddUpgradeSqlToList() 390 sqlList.push_back("alter table " + tableInfo.GetTableName() + " add " + colName + in AddUpgradeSqlToList() 395 …nalUtils::AnalysisTrackerTable(sqlite3 *db, const TrackerTable &trackerTable, TableInfo &tableInfo) in AnalysisTrackerTable() argument 397 int errCode = SQLiteUtils::AnalysisSchema(db, trackerTable.GetTableName(), tableInfo, true); in AnalysisTrackerTable() 402 tableInfo.SetTrackerTable(trackerTable); in AnalysisTrackerTable() 403 errCode = tableInfo.CheckTrackerTable(); in AnalysisTrackerTable()
|
H A D | sqlite_single_relational_storage_engine.cpp | 509 if (tableInfo.GetTableSyncType() == TableSyncType::DEVICE_COOPERATION) { in CheckAndCacheTrackerSchema() 526 tableInfo.SetTrackerTable(tracker.GetTrackerTable(schema.tableName)); in CheckAndCacheTrackerSchema() 527 errCode = tableInfo.CheckTrackerTable(); in CheckAndCacheTrackerSchema() 559 TableInfo tableInfo; in GetOrInitTrackerSchemaFromMeta() local 560 errCode = handle->AnalysisTrackerTable(iter.second.GetTrackerTable(), tableInfo); in GetOrInitTrackerSchemaFromMeta() 674 TableInfo tableInfo = table.second; in SetReference() local 862 TableInfo tableInfo = schema.GetTable(oldTableName); in DoAlterSharedTableName() local 863 tableInfo.SetTableName(newTableName); in DoAlterSharedTableName() 864 schema.AddRelationalTable(tableInfo); in DoAlterSharedTableName() 946 TableInfo tableInfo = schema.GetTable(tableSchema.sharedTableName); in CheckIfExistUserTable() local [all …]
|
H A D | sqlite_relational_utils.h | 44 static void AddUpgradeSqlToList(const TableInfo &tableInfo, 47 …atic int AnalysisTrackerTable(sqlite3 *db, const TrackerTable &trackerTable, TableInfo &tableInfo);
|
H A D | sqlite_single_ver_relational_storage_executor.cpp | 168 const std::string &calPrimaryKeyHash, TableInfo &tableInfo) in GeneLogInfoForExistedData() argument 194 TrackerTable trackerTable = tableInfo.GetTrackerTable(); in GeneLogInfoForExistedData() 199 …sql += tableInfo.GetTrackerTable().GetExtendName().empty() ? "''" : tableInfo.GetTrackerTable().Ge… in GeneLogInfoForExistedData() 287 TableInfo tableInfo = localSchema_.GetTable(tableName); in CompareSchemaTableColumns() local 315 TableInfo tableInfo = schema.GetTable(tableName); in UpgradeDistributedTable() local 324 tableInfo.SetTableName(tableName); in UpgradeDistributedTable() 325 schema.AddRelationalTable(tableInfo); in UpgradeDistributedTable() 567 table_ = tableInfo; in SetTableInfo() 1165 const TableInfo &tableInfo) in GetSyncDataByQuery() argument 1167 baseTblName_ = tableInfo.GetTableName(); in GetSyncDataByQuery() [all …]
|
H A D | sqlite_single_ver_relational_storage_executor.h | 73 …ion<int(sqlite3 *, sqlite3_stmt *&, sqlite3_stmt *&, bool &)> getStmt, const TableInfo &tableInfo); 148 int AnalysisTrackerTable(const TrackerTable &trackerTable, TableInfo &tableInfo); 172 …int RenewTableTrigger(DistributedTableMode mode, const TableInfo &tableInfo, TableSyncType syncTyp… 188 int UpgradedLogForExistedData(TableInfo &tableInfo, bool schemaChanged); 279 …void SetTableInfo(const TableInfo &tableInfo); // When put or get sync data, must call the func f… 282 TableInfo &tableInfo);
|
H A D | sqlite_single_ver_relational_storage_extend_executor.cpp | 325 TableInfo &tableInfo) in AnalysisTrackerTable() argument 327 return SQLiteRelationalUtils::AnalysisTrackerTable(dbHandle_, trackerTable, tableInfo); in AnalysisTrackerTable() 476 int SQLiteSingleVerRelationalStorageExecutor::UpgradedLogForExistedData(TableInfo &tableInfo, bool … in UpgradedLogForExistedData() argument 478 if (tableInfo.GetTableSyncType() == TableSyncType::DEVICE_COOPERATION) { in UpgradedLogForExistedData() 481 std::string logTable = DBCommon::GetLogTableName(tableInfo.GetTableName()); in UpgradedLogForExistedData() 491 if (tableInfo.GetTrackerTable().IsEmpty()) { in UpgradedLogForExistedData() 499 std::string sql = "UPDATE " + tableInfo.GetTableName() + " SET _rowid_=_rowid_"; in UpgradedLogForExistedData() 500 TrackerTable trackerTable = tableInfo.GetTrackerTable(); in UpgradedLogForExistedData() 1083 const TableInfo &tableInfo, TableSyncType syncType) in RenewTableTrigger() argument 1086 return tableManager->AddRelationalLogTableTrigger(dbHandle_, tableInfo, ""); in RenewTableTrigger()
|
H A D | sqlite_single_relational_storage_engine.h | 47 …int CheckAndCacheTrackerSchema(const TrackerSchema &schema, TableInfo &tableInfo, bool &isFirstCre…
|
H A D | sqlite_relational_store.h | 166 …bool CheckFields(const std::vector<Field> &newFields, const TableInfo &tableInfo, std::vector<Fiel…
|
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/unittest/common/interfaces/ |
H A D | distributeddb_interfaces_log_test.cpp | 77 TableInfo tableInfo; variable 78 tableInfo.SetPrimaryKey("key2", 1); 79 tableInfo.SetPrimaryKey("key3", 2); 82 string value = manager.CalcPrimaryKeyHash(key1, tableInfo, key4);
|
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/src/cloud/ |
H A D | schema_mgr.cpp | 36 TableInfo tableInfo = localSchema.GetTable(tableName); in ChkSchema() local 37 if (tableInfo.Empty()) { in ChkSchema() 42 if (tableInfo.GetTableSyncType() != TableSyncType::CLOUD_COOPERATION) { in ChkSchema() 54 std::map<int, FieldName> primaryKeys = tableInfo.GetPrimaryKey(); in ChkSchema() 55 FieldInfoMap localFields = tableInfo.GetFields(); in ChkSchema() 155 TableInfo tableInfo = localSchema.GetTable(tableName); in SetCloudDbSchema() local 156 if (tableInfo.Empty()) { in SetCloudDbSchema() 161 FieldInfoMap localFields = tableInfo.GetFields(); in SetCloudDbSchema()
|
/ohos5.0/foundation/communication/netmanager_base/test/netstatsmanager/unittest/net_stats_manager_test/ |
H A D | net_stats_database_helper_test.cpp | 54 std::string tableInfo = variable 56 int32_t ret = helper->CreateTable("testTable", tableInfo); 63 const std::string tableInfo = UID_TABLE_CREATE_PARAM; variable 64 int32_t ret = helper->CreateTable(UID_TABLE, tableInfo); 71 const std::string tableInfo = IFACE_TABLE_CREATE_PARAM; variable 72 int32_t ret = helper->CreateTable(IFACE_TABLE, tableInfo); 79 const std::string tableInfo = UID_SIM_TABLE_CREATE_PARAM; variable 80 int32_t ret = helper->CreateTable(UID_SIM_TABLE, tableInfo);
|
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/src/sqlite/ |
H A D | sqlite_log_table_manager.cpp | 124 TableInfo tableInfo; in UpgradeKvSyncLogTable() local 125 int errCode = SQLiteUtils::AnalysisSchemaFieldDefine(db, tableName, tableInfo); in UpgradeKvSyncLogTable() 129 auto fields = tableInfo.GetFields(); in UpgradeKvSyncLogTable()
|
H A D | query_object.cpp | 471 const auto &tableInfo = schemaObj.GetTable(tableName_); in SetSchema() local 472 SchemaObject schema(tableInfo); in SetSchema()
|
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/unittest/common/syncer/ |
H A D | relational_virtual_device.cpp | 58 void RelationalVirtualDevice::SetTableInfo(const TableInfo &tableInfo) in SetTableInfo() argument 60 static_cast<VirtualRelationalVerSyncDBInterface *>(storage_)->SetTableInfo(tableInfo); in SetTableInfo()
|
H A D | relational_virtual_device.h | 35 void SetTableInfo(const TableInfo &tableInfo);
|
H A D | virtual_relational_ver_sync_db_interface.cpp | 320 void VirtualRelationalVerSyncDBInterface::SetTableInfo(const TableInfo &tableInfo) in SetTableInfo() argument 322 schemaObj_.AddRelationalTable(tableInfo); in SetTableInfo()
|
H A D | distributeddb_relational_multi_user_test.cpp | 124 TableInfo tableInfo; in PrepareVirtualDeviceEnv() local 125 SQLiteUtils::AnalysisSchema(db, tableName, tableInfo); in PrepareVirtualDeviceEnv() 127 std::vector<FieldInfo> fieldInfoList = tableInfo.GetFieldInfos(); in PrepareVirtualDeviceEnv() 129 dev->SetTableInfo(tableInfo); in PrepareVirtualDeviceEnv()
|
H A D | virtual_relational_ver_sync_db_interface.h | 109 void SetTableInfo(const TableInfo &tableInfo);
|
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/syncer/src/cloud/ |
H A D | process_notifier.cpp | 50 TableProcessInfo tableInfo; in InitSyncProcess() local 51 tableInfo.process = ProcessStatus::PREPARED; in InitSyncProcess() 52 syncProcess.tableProcess[table] = tableInfo; in InitSyncProcess()
|
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/interfaces/src/relational/ |
H A D | relational_store_sqlite_ext.cpp | 869 for (const auto &tableInfo : tableInfos) { in GetTriggerSqls() local 871 if (!tableInfo.second) { in GetTriggerSqls() 872 int errCode = GetPrimaryKeyName(db, tableInfo.first, primaryKey); in GetTriggerSqls() 877 std::string sql = GetInsertTrigger(tableInfo.first, tableInfo.second, primaryKey); in GetTriggerSqls() 879 sql = GetUpdateTrigger(tableInfo.first, tableInfo.second, primaryKey); in GetTriggerSqls() 881 sql = GetDeleteTrigger(tableInfo.first, tableInfo.second, primaryKey); in GetTriggerSqls() 1529 for (auto &tableInfo : tableInfos) { in GetTableInfos() local 1531 JudgeIfGetRowid(db, tableInfo.first, type, tableInfo.second); in GetTableInfos()
|
/ohos5.0/foundation/communication/netmanager_base/services/netstatsmanager/include/ |
H A D | net_stats_database_helper.h | 41 int32_t CreateTable(const std::string &tableName, const std::string &tableInfo);
|
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/unittest/common/common/ |
H A D | distributeddb_relational_schema_object_test.cpp | 748 TableInfo tableInfo; in GetTableInfo() local 749 EXPECT_EQ(SQLiteUtils::AnalysisSchema(db, tableName, tableInfo), E_OK); in GetTableInfo() 751 return tableInfo; in GetTableInfo()
|
/ohos5.0/foundation/communication/netmanager_base/services/netstatsmanager/src/ |
H A D | net_stats_database_helper.cpp | 83 …2_t NetStatsDatabaseHelper::CreateTable(const std::string &tableName, const std::string &tableInfo) in CreateTable() argument 85 std::string sql = "CREATE TABLE IF NOT EXISTS " + tableName + "(" + tableInfo + ");"; in CreateTable()
|