From b01c1cf9d5b4e615cc7d55ee303e1423992501c3 Mon Sep 17 00:00:00 2001 From: Piotr PG Gajek Date: Tue, 10 Oct 2023 15:36:52 +0200 Subject: [PATCH] Refactoring --- force-app/main/default/classes/SOQL.cls | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/force-app/main/default/classes/SOQL.cls b/force-app/main/default/classes/SOQL.cls index 6de2295..7f89b7e 100644 --- a/force-app/main/default/classes/SOQL.cls +++ b/force-app/main/default/classes/SOQL.cls @@ -728,7 +728,6 @@ public virtual inherited sharing class SOQL implements Queryable { private class QFields implements QueryClause { private Set fields = new Set(); private Set aggregatedFields = new Set(); - private Boolean hasCount = false; public void count() { count('COUNT()'); @@ -744,7 +743,6 @@ public virtual inherited sharing class SOQL implements Queryable { } private void count(String count) { - this.hasCount = true; withAggregatedField(count); fields.add(count); } @@ -797,7 +795,7 @@ public virtual inherited sharing class SOQL implements Queryable { } public Boolean hasCount() { - return hasCount; + return !aggregatedFields.isEmpty(); } public override String toString() {