Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
pgajek2 committed Oct 10, 2023
1 parent 36c9ecb commit b01c1cf
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions force-app/main/default/classes/SOQL.cls
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,6 @@ public virtual inherited sharing class SOQL implements Queryable {
private class QFields implements QueryClause {
private Set<String> fields = new Set<String>();
private Set<String> aggregatedFields = new Set<String>();
private Boolean hasCount = false;

public void count() {
count('COUNT()');
Expand All @@ -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);
}
Expand Down Expand Up @@ -797,7 +795,7 @@ public virtual inherited sharing class SOQL implements Queryable {
}

public Boolean hasCount() {
return hasCount;
return !aggregatedFields.isEmpty();
}

public override String toString() {
Expand Down

0 comments on commit b01c1cf

Please sign in to comment.