mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-25 18:29:13 +08:00
Synchronization code
This commit is contained in:
@@ -909,6 +909,10 @@ namespace SqlSugar
|
||||
{
|
||||
pre = Builder.GetTranslationColumnName(TableShortName) + ".";
|
||||
}
|
||||
else if (this.EasyJoinInfos?.Count>0 && this.EasyJoinInfos.Any(it => TableShortName.HasValue()))
|
||||
{
|
||||
pre = Builder.GetTranslationColumnName(TableShortName) + ".";
|
||||
}
|
||||
var columns = this.Context.EntityMaintenance.GetEntityInfo(this.EntityType).Columns.Where(it => !it.IsIgnore);
|
||||
if (this.IgnoreColumns.HasValue())
|
||||
{
|
||||
|
||||
@@ -113,6 +113,10 @@ namespace SqlSugar
|
||||
return 0;
|
||||
}
|
||||
var result = 0;
|
||||
if (this.Context.CurrentConnectionConfig?.MoreSettings?.IsCorrectErrorSqlParameterName == true)
|
||||
{
|
||||
UpdateBuilder.Parameters = UpdateBuilder.Parameters.Where(it => UtilMethods.NoErrorParameter(it.ParameterName)).ToList();
|
||||
}
|
||||
if (sql != Environment.NewLine)
|
||||
{
|
||||
result = this.Ado.ExecuteCommand(sql, UpdateBuilder.Parameters == null ? null : UpdateBuilder.Parameters.ToArray());
|
||||
|
||||
@@ -1685,5 +1685,29 @@ namespace SqlSugar
|
||||
return string.Join(" AND ", wheres);
|
||||
}
|
||||
|
||||
internal static bool NoErrorParameter(string parameterName)
|
||||
{
|
||||
if (parameterName==null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (parameterName.Contains(" "))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (parameterName.Contains("("))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (parameterName.Contains("("))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (parameterName.Contains("."))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user