mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 13:06:50 +08:00
Update xugu
This commit is contained in:
parent
1f829d0004
commit
c82f7c0300
@ -118,12 +118,42 @@ namespace SqlSugar.Xugu
|
||||
int result = 0;
|
||||
foreach (var item in sqlParts)
|
||||
{
|
||||
if (item.TrimStart('\r').TrimStart('\n') != "") result += base.ExecuteCommand(item, parameters);
|
||||
if (item.TrimStart('\r').TrimStart('\n') != "") result += base.ExecuteCommand(item,CopySugarParameters(parameters.ToList()));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
else return base.ExecuteCommand(sql, parameters);
|
||||
}
|
||||
public List<SugarParameter> CopySugarParameters(List<SugarParameter> pars)
|
||||
{
|
||||
if (pars == null) return null;
|
||||
var newParameters = pars.Select(it => new SugarParameter(it.ParameterName, it.Value)
|
||||
{
|
||||
TypeName = it.TypeName,
|
||||
Value = it.Value,
|
||||
IsRefCursor = it.IsRefCursor,
|
||||
IsArray = it.IsArray,
|
||||
IsJson = it.IsJson,
|
||||
ParameterName = it.ParameterName,
|
||||
IsNvarchar2 = it.IsNvarchar2,
|
||||
IsNClob = it.IsClob,
|
||||
IsClob = it.IsClob,
|
||||
UdtTypeName = it.UdtTypeName,
|
||||
CustomDbType = it.CustomDbType,
|
||||
DbType = it.DbType,
|
||||
Direction = it.Direction,
|
||||
Precision = it.Precision,
|
||||
Size = it.Size,
|
||||
Scale = it.Scale,
|
||||
IsNullable = it.IsNullable,
|
||||
SourceColumn = it.SourceColumn,
|
||||
SourceColumnNullMapping = it.SourceColumnNullMapping,
|
||||
SourceVersion = it.SourceVersion,
|
||||
TempDate = it.TempDate,
|
||||
_Size = it._Size
|
||||
});
|
||||
return newParameters.ToList();
|
||||
}
|
||||
public override async Task<int> ExecuteCommandAsync(string sql, SugarParameter[] parameters)
|
||||
{
|
||||
CheckSqlNull(sql);
|
||||
|
Loading…
Reference in New Issue
Block a user