mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-22 20:13:41 +08:00
Generated SQL optimization
This commit is contained in:
@@ -1044,6 +1044,14 @@ namespace SqlSugar
|
||||
}
|
||||
public virtual int Count()
|
||||
{
|
||||
if (this.QueryBuilder.Skip == null&&
|
||||
this.QueryBuilder.Take == null&&
|
||||
this.QueryBuilder.OrderByValue == null &&
|
||||
this.QueryBuilder.PartitionByValue == null)
|
||||
{
|
||||
|
||||
return this.Clone().Select<int>(" COUNT(1) ").ToList().First();
|
||||
}
|
||||
MappingTableList expMapping;
|
||||
int result;
|
||||
_CountBegin(out expMapping, out result);
|
||||
|
Reference in New Issue
Block a user