Browse Source

Update ClickHouse Access

pull/30/head
sunkaixuan 2 years ago
parent
commit
4f9c796952
  1. 4
      Src/Asp.NetCore2/SqlSugar.AccessCore/Access/SqlBuilder/AccessInsertBuilder.cs
  2. 4
      Src/Asp.NetCore2/SqlSugar.ClickHouseCore/ClickHouse/SqlBuilder/ClickHouseInsertBuilder.cs

4
Src/Asp.NetCore2/SqlSugar.AccessCore/Access/SqlBuilder/AccessInsertBuilder.cs

@ -48,7 +48,7 @@ namespace SqlSugar.Access
string columnsString = string.Join(",", groupList.First().Select(it => Builder.GetTranslationColumnName(it.DbColumnName)));
if (isSingle)
{
string columnParametersString = string.Join(",", this.DbColumnInfoList.Select(it => Builder.SqlParameterKeyWord + it.DbColumnName));
string columnParametersString = string.Join(",", this.DbColumnInfoList.Select(it =>base.GetDbColumn(it, Builder.SqlParameterKeyWord + it.DbColumnName)));
return string.Format(SqlTemplate, GetTableNameString, columnsString, columnParametersString);
}
else
@ -71,7 +71,7 @@ namespace SqlSugar.Access
// batchInsetrSql.Append("\t\r\nUNION ");
//}
//temp+" Values ( " + string.Join(",", columns.Select(it => FormatValue(it.Value) )+")"
batchInsetrSql.Append($"{temp} values ({string.Join(",", columns.Select(it => FormatValue(it.Value)))}) "+UtilConstants.ReplaceCommaKey);
batchInsetrSql.Append($"{temp} values ({string.Join(",", columns.Select(it =>base.GetDbColumn(it,FormatValue(it.Value))))}) "+UtilConstants.ReplaceCommaKey);
++i;
}
pageIndex++;

4
Src/Asp.NetCore2/SqlSugar.ClickHouseCore/ClickHouse/SqlBuilder/ClickHouseInsertBuilder.cs

@ -129,7 +129,7 @@ namespace SqlSugar.ClickHouse
string columnsString = string.Join(",", groupList.First().Select(it => Builder.GetTranslationColumnName(it.DbColumnName)));
if (isSingle)
{
string columnParametersString = string.Join(",", this.DbColumnInfoList.Select(it => Builder.SqlParameterKeyWord + it.DbColumnName));
string columnParametersString = string.Join(",", this.DbColumnInfoList.Select(it =>base.GetDbColumn(it, Builder.SqlParameterKeyWord + it.DbColumnName)));
ActionMinDate();
return string.Format(SqlTemplate, GetTableNameString, columnsString, columnParametersString);
}
@ -144,7 +144,7 @@ namespace SqlSugar.ClickHouse
foreach (var item in groupList)
{
batchInsetrSql.Append("(");
insertColumns = string.Join(",", item.Select(it => FormatValue(it.Value, it.PropertyName)));
insertColumns = string.Join(",", item.Select(it =>base.GetDbColumn(it, FormatValue(it.Value, it.PropertyName))));
batchInsetrSql.Append(insertColumns);
if (groupList.Last() == item)
{

Loading…
Cancel
Save