mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-24 07:22:57 +08:00
Update query table
This commit is contained in:
parent
0179fef331
commit
bc6eca7655
@ -372,9 +372,16 @@ namespace SqlSugar
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (item.CSharpTypeName.EqualCase("nstring"))
|
||||
{
|
||||
inValue1 = ("(" + inArray.Select(it => it == "" ? "null" : it).Distinct().ToArray().ToJoinSqlInValsByVarchar() + ")");
|
||||
}
|
||||
else
|
||||
{
|
||||
inValue1 = ("(" + inArray.Select(it => it == "" ? "null" : it).Distinct().ToArray().ToJoinSqlInVals() + ")");
|
||||
}
|
||||
}
|
||||
|
||||
return inValue1;
|
||||
}
|
||||
|
@ -18,6 +18,17 @@ namespace SqlSugar
|
||||
return string.Join(",", array.Where(c => c != null).Select(it => it.ToSqlValue()));
|
||||
}
|
||||
}
|
||||
public static string ToJoinSqlInValsByVarchar<T>(this T[] array)
|
||||
{
|
||||
if (array == null || array.Length == 0)
|
||||
{
|
||||
return ToSqlValue(string.Empty);
|
||||
}
|
||||
else
|
||||
{
|
||||
return string.Join(",", array.Where(c => c != null).Select(it => "N"+it.ToSqlValue()));
|
||||
}
|
||||
}
|
||||
public static string ToJoinSqlInValsN<T>(this T[] array)
|
||||
{
|
||||
if (array == null || array.Length == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user