mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-15 14:04:44 +08:00
Add SqlFunc.Rank
This commit is contained in:
parent
8b0281fd22
commit
ce013315e4
@ -70,6 +70,16 @@ namespace SqlSugar
|
||||
{
|
||||
throw new NotSupportedException("Can only be used in expressions");
|
||||
}
|
||||
|
||||
public static int Rank(object orderByField, object partitionBy)
|
||||
{
|
||||
throw new NotSupportedException("Can only be used in expressions");
|
||||
}
|
||||
public static int Rank(object orderByField)
|
||||
{
|
||||
throw new NotSupportedException("Can only be used in expressions");
|
||||
}
|
||||
|
||||
public static int RowCount(object countFiledName,object orderByField, object partitionBy)
|
||||
{
|
||||
throw new NotSupportedException("Can only be used in expressions");
|
||||
|
@ -909,6 +909,8 @@ namespace SqlSugar
|
||||
return this.Context.DbMehtods.Stuff(model);
|
||||
case "RowNumber":
|
||||
return this.Context.DbMehtods.RowNumber(model);
|
||||
case "Rank":
|
||||
return this.Context.DbMehtods.RowNumber(model).Replace("row_number() over(", " rank() over(");
|
||||
case "RowCount":
|
||||
return this.Context.DbMehtods.RowCount(model);
|
||||
case "RowSum":
|
||||
|
Loading…
Reference in New Issue
Block a user