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

NOT LIKE operator filter implementation #75

Closed salberski closed 1 year ago

salberski commented 1 year ago

NOT LIKE operator is not that popular capability of the Salesforce SOQL. It works the same way LIKE operator does. We can use NOT LIKE operator to extract those rows which do NOT have a particular substring in the filtered field.

The tricky part is the syntax (unfortunately I hadn't found this in the official documentation). NOT operator needs to be added before the field that we're trying to filter and needs to be wrapped with the parentheses to properly work with the group of filters.

Examples: SELECT Id FROM Account WHERE Type = 'Customer' AND (NOT Name LIKE '%Ltd%')

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
apex-soql-lib ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 8, 2023 1:09pm
salberski commented 1 year ago

@osieckiAdam @pgajek2 @janeksledziewski Please Guys, review this s...tuff