Skip to content

Commit

Permalink
Code Improvement
Browse files Browse the repository at this point in the history
Signed-off-by: Piotr PG Gajek <[email protected]>
  • Loading branch information
pgajek2 committed May 8, 2024
1 parent 1e766df commit e41aeb3
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions force-app/main/default/classes/SOQL.cls
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,8 @@ public virtual inherited sharing class SOQL implements Queryable {
}

public override String toString() {
return builder.resetBinding().toString();
binder = new Binder(); // clear binding before query build
return builder.toString();
}

public Object toValueOf(SObjectField fieldToExtract) {
Expand Down Expand Up @@ -877,11 +878,6 @@ public virtual inherited sharing class SOQL implements Queryable {
}
}

public QueryBuilder resetBinding() {
binder = new Binder();
return this;
}

public override String toString() {
String query = '';

Expand Down

0 comments on commit e41aeb3

Please sign in to comment.