From e41aeb3b68da9341c09caca7811f05aea7ba748a Mon Sep 17 00:00:00 2001 From: Piotr PG Gajek Date: Wed, 8 May 2024 14:46:54 +0200 Subject: [PATCH] Code Improvement Signed-off-by: Piotr PG Gajek --- force-app/main/default/classes/SOQL.cls | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/force-app/main/default/classes/SOQL.cls b/force-app/main/default/classes/SOQL.cls index babe597..351a501 100644 --- a/force-app/main/default/classes/SOQL.cls +++ b/force-app/main/default/classes/SOQL.cls @@ -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) { @@ -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 = '';