mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-07 18:04:55 +08:00
4.2.0.6
This commit is contained in:
@@ -132,7 +132,7 @@ namespace OrmTest.Demo
|
||||
int count = 0;
|
||||
|
||||
var list4 = db.Queryable<Student>()
|
||||
.PartitionBy(it => new { it.Name }).Take(1).ToPageList(3,3,ref count);
|
||||
.PartitionBy(it => new { it.Name }).Take(1).OrderBy(it=>it.Id).ToPageList(3,3,ref count);
|
||||
|
||||
//SqlFunc.AggregateSum(object thisValue)
|
||||
//SqlFunc.AggregateAvg<TResult>(TResult thisValue)
|
||||
|
||||
@@ -224,6 +224,7 @@ namespace SqlSugar
|
||||
public virtual string ToSqlString()
|
||||
{
|
||||
string oldOrderBy = this.OrderByValue;
|
||||
string externalOrderBy = oldOrderBy;
|
||||
if (!IsDisabledGobalFilter && this.Context.QueryFilter.GeFilterList.IsValuable())
|
||||
{
|
||||
var gobalFilterList = this.Context.QueryFilter.GeFilterList.Where(it => it.FilterName.IsNullOrEmpty()).ToList();
|
||||
@@ -252,7 +253,10 @@ namespace SqlSugar
|
||||
var result = ToPageSql(sql.ToString(), this.Take, this.Skip);
|
||||
if (ExternalPageIndex > 0)
|
||||
{
|
||||
result = string.Format("SELECT *,ROW_NUMBER() OVER(ORDER BY GETDATE()) AS RowIndex2 FROM ({0}) ExternalTable ", result);
|
||||
if (externalOrderBy.IsNullOrEmpty()) {
|
||||
externalOrderBy = " ORDER BY GetDate() ";
|
||||
}
|
||||
result = string.Format("SELECT *,ROW_NUMBER() OVER({0}) AS RowIndex2 FROM ({1}) ExternalTable ", externalOrderBy,result);
|
||||
result = ToPageSql2(result,ExternalPageIndex, ExternalPageSize, true);
|
||||
}
|
||||
this.OrderByValue = oldOrderBy;
|
||||
|
||||
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("4.2.0.4")]
|
||||
[assembly: AssemblyFileVersion("4.2.0.4")]
|
||||
[assembly: AssemblyVersion("4.2.0.6")]
|
||||
[assembly: AssemblyFileVersion("4.2.0.6")]
|
||||
|
||||
Reference in New Issue
Block a user