Update TDengine BulkCopy

This commit is contained in:
sunkaixuan
2025-04-22 19:14:17 +08:00
parent 11f9799e21
commit 87d90e1c4d

View File

@@ -86,10 +86,11 @@ namespace SqlSugar.TDengine
// 调用 InsertChildTable // 调用 InsertChildTable
InsertChildTable(tableName, childTable, tagColumns,sb, sbTables); InsertChildTable(tableName, childTable, tagColumns,sb, sbTables);
}
await this.Context.Ado.ExecuteCommandAsync(sbTables.ToString()); var sql = sb.ToString();
await this.Context.Ado.ExecuteCommandAsync(sb.ToString()); var result = await this.Context.Ado.ExecuteCommandAsync(sql);
sb.Clear();
}
} }
else else
{ {
@@ -140,7 +141,7 @@ namespace SqlSugar.TDengine
var action = this.Context.TempItems[TagKey + "action"] as Func<string, string>; var action = this.Context.TempItems[TagKey + "action"] as Func<string, string>;
var subTableName = builder.GetTranslationColumnName(action(tagsValues)); var subTableName = builder.GetTranslationColumnName(action(tagsValues));
sbtables.AppendLine($"CREATE TABLE {subTableName} USING {tableName} TAGS({tags});"); //sbtables.AppendLine($"CREATE TABLE {subTableName} USING {tableName} TAGS({tags});");
var sqlBuilder =sb; var sqlBuilder =sb;