mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-15 18:55:07 +08:00
Synchronization code
This commit is contained in:
@@ -88,7 +88,7 @@ namespace SqlSugar
|
||||
{
|
||||
return string.Format(SqlTemplateBatchSelect, "NULL");
|
||||
}
|
||||
return string.Format(SqlTemplateBatchSelect, "'" + value.ObjToString().ToSqlFilter() + "'");
|
||||
return string.Format(SqlTemplateBatchSelect, "'" + value.ObjToStringNoTrim().ToSqlFilter() + "'");
|
||||
})) + "),");
|
||||
++i;
|
||||
}
|
||||
|
@@ -98,6 +98,11 @@ namespace SqlSugar
|
||||
if (thisValue != null) return thisValue.ToString().Trim();
|
||||
return "";
|
||||
}
|
||||
public static string ObjToStringNoTrim(this object thisValue)
|
||||
{
|
||||
if (thisValue != null) return thisValue.ToString();
|
||||
return "";
|
||||
}
|
||||
public static string ObjToStringNew(this object thisValue)
|
||||
{
|
||||
if (thisValue != null && thisValue is byte[])
|
||||
|
@@ -380,6 +380,11 @@ namespace SqlSugar
|
||||
{
|
||||
Expression trueValue = Expression.Constant(true);
|
||||
var newItem = ExpressionBuilderHelper.CreateExpression(item, trueValue, ExpressionType.And);
|
||||
var member = (item as MemberExpression);
|
||||
if (member.Member.Name == "HasValue")
|
||||
{
|
||||
newItem = ExpressionBuilderHelper.CreateExpression(member.Expression, Expression.Constant(null), ExpressionType.And);
|
||||
}
|
||||
AppendItem(parameter, name, new List<Expression>() { newItem}, model, newItem);
|
||||
}
|
||||
else
|
||||
@@ -1002,7 +1007,7 @@ namespace SqlSugar
|
||||
case "Format":
|
||||
var xx=base.BaseParameter;
|
||||
var result = this.Context.DbMehtods.Format(model);
|
||||
if (this.Context.MethodName.IsIn("RowNumber", "MappingColumn"))
|
||||
if (!string.IsNullOrEmpty(this.Context.MethodName))
|
||||
{
|
||||
result = this.Context.DbMehtods.FormatRowNumber(model);
|
||||
}
|
||||
|
Reference in New Issue
Block a user