mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Add Sqlfunc.Stuff
This commit is contained in:
parent
ad1a5628b9
commit
9be7691d3d
@ -544,5 +544,13 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
return model.Args[0].MemberName + " DESC ";
|
return model.Args[0].MemberName + " DESC ";
|
||||||
}
|
}
|
||||||
|
public virtual string Stuff(MethodCallExpressionModel model)
|
||||||
|
{
|
||||||
|
var parameter1 = model.Args[0];
|
||||||
|
var parameter2 = model.Args[1];
|
||||||
|
var parameter3 = model.Args[2];
|
||||||
|
var parameter4 = model.Args[3];
|
||||||
|
return $" STUFF ({parameter1.MemberName}, {parameter2.MemberName}, {parameter3.MemberName}, {parameter4.MemberName}) ";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -85,5 +85,6 @@ namespace SqlSugar
|
|||||||
string LessThanOrEqual(MethodCallExpressionModel model);
|
string LessThanOrEqual(MethodCallExpressionModel model);
|
||||||
string Asc(MethodCallExpressionModel model);
|
string Asc(MethodCallExpressionModel model);
|
||||||
string Desc(MethodCallExpressionModel model);
|
string Desc(MethodCallExpressionModel model);
|
||||||
|
string Stuff(MethodCallExpressionModel model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,12 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
throw new NotSupportedException("Can only be used in expressions");
|
throw new NotSupportedException("Can only be used in expressions");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string Stuff(string sourceString, int start, int length, string AddString)
|
||||||
|
{
|
||||||
|
throw new NotSupportedException("Can only be used in expressions");
|
||||||
|
}
|
||||||
|
|
||||||
public static bool GreaterThanOrEqual(object thisValue, object gtValue)
|
public static bool GreaterThanOrEqual(object thisValue, object gtValue)
|
||||||
{
|
{
|
||||||
throw new NotSupportedException("Can only be used in expressions");
|
throw new NotSupportedException("Can only be used in expressions");
|
||||||
|
@ -998,6 +998,8 @@ namespace SqlSugar
|
|||||||
return this.Context.DbMehtods.Asc(model);
|
return this.Context.DbMehtods.Asc(model);
|
||||||
case "Desc":
|
case "Desc":
|
||||||
return this.Context.DbMehtods.Desc(model);
|
return this.Context.DbMehtods.Desc(model);
|
||||||
|
case "Stuff":
|
||||||
|
return this.Context.DbMehtods.Stuff(model);
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user