Skip to content

Commit 430ba60

Browse files
authored
Merge pull request #2073 from sukney/master
增加 ntile(5) over (order by ...)
2 parents 667888e + 6c315c1 commit 430ba60

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

FreeSql/Extensions/FreeSqlGlobalExpressionCallExtensions.cs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,18 @@ public static T3 AggregateMin<T3>(T3 column)
228228
/// </summary>
229229
/// <returns></returns>
230230
public static ISqlOver<int> DenseRank() => Over<int>("dense_rank()");
231-
/// <summary>
232-
/// count() over(order by ...)
233-
/// </summary>
234-
/// <returns></returns>
235-
public static ISqlOver<int> Count(object column) => Over<int>($"count({expContext.Value.ParsedContent["column"]})");
231+
232+
/// <summary>
233+
/// ntile(5) over (order by ...)
234+
/// </summary>
235+
/// <returns></returns>
236+
public static ISqlOver<int> Ntile(int value) => Over<int>($"ntile({value})");
237+
238+
/// <summary>
239+
/// count() over(order by ...)
240+
/// </summary>
241+
/// <returns></returns>
242+
public static ISqlOver<int> Count(object column) => Over<int>($"count({expContext.Value.ParsedContent["column"]})");
236243
/// <summary>
237244
/// sum(..) over(order by ...)
238245
/// </summary>

0 commit comments

Comments
 (0)