Closed pgajek2 closed 1 year ago
Instead of doing this:
public SOQL.FilterGroup getFilters(String accountName, String accountIndustry) { SOQL.FilterGroup group = SOQL.FilterGroup; if (String.isNotBlank(accountName)) { group.add(SOQL.Filter.name().equal(accountName)); } if (String.isNotBlank(accountIndustry)) { group.add(SOQL.Filter.with(Account.Industry).equal(accountIndustry)); } return group; }
Allow for something like that:
SOQL.FilterGroup .add(SOQL.Filter.name().equal(accountName).ignoreWhen(String.isBlank(accountName))) .add(SOQL.Filter.with(Account.Industry).equal(accountName).ignoreWhen(String.isBlank(accountIndustry)))
Instead of doing this:
Allow for something like that: