@ -24,6 +24,10 @@ namespace SqlSugar
{
return "count(1) over()";
}
public string RowSum(MethodCallExpressionModel model)
return "SUM(" + model.Args[0].MemberName +") over()";
public virtual string IIF(MethodCallExpressionModel model)
var parameter = model.Args[0];
@ -90,6 +90,7 @@ namespace SqlSugar
string Stuff(MethodCallExpressionModel model);
string RowNumber(MethodCallExpressionModel model);
string RowCount(MethodCallExpressionModel model);
string RowSum(MethodCallExpressionModel model);
string Exists(MethodCallExpressionModel model);
string GetDateString(string dateValue,string format);
string GetForXmlPath();
@ -33,6 +33,10 @@ namespace SqlSugar
throw new NotSupportedException("Can only be used in expressions");
public static TRestult RowSum<TRestult>(TRestult filedName)
public static string JsonField(object json,string fieldName)
@ -790,6 +790,8 @@ namespace SqlSugar
return this.Context.DbMehtods.RowNumber(model);
case "RowCount":
return this.Context.DbMehtods.RowCount(model);
case "RowSum":
return this.Context.DbMehtods.RowSum(model);
case "Exists":
if (model.Args.Count > 1)