beyond-the-cloud-dev / soql-lib

The SOQL Lib provides functional constructs for SOQL queries in Apex.
https://soql.beyondthecloud.dev/
MIT License
61 stars 9 forks source link

Use Iterable Set #35

Closed pgajek2 closed 1 year ago

pgajek2 commented 1 year ago

The Set class now implements the Iterable interface, so you can directly iterate over sets. Both sets and lists are iterable, allowing for more code reuse.

Where: This change applies to Lightning Experience and Salesforce Classic in Enterprise, Performance, Unlimited, and Developer editions. This change is a versioned change in API version 58.0 and later.

Enhancement

  1. Replace String.join(new List<String>(SET), ', '); to String.join(SET ', ');
  2. Use Iterable<Id> instead of separated methods for Set and List e.g byIds(Iterable<Id> recordIds)

ETA Summer 23' will be available in production: 10th of June 2023

Resources