mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-23 04:23:47 +08:00
Generated SQL optimization
This commit is contained in:
@@ -1044,6 +1044,14 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
public virtual int Count()
|
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;
|
MappingTableList expMapping;
|
||||||
int result;
|
int result;
|
||||||
_CountBegin(out expMapping, out result);
|
_CountBegin(out expMapping, out result);
|
||||||
|
Reference in New Issue
Block a user