apex-enterprise-patterns / fflib-apex-common

Common Apex Library supporting Apex Enterprise Patterns and much more!
BSD 3-Clause "New" or "Revised" License
899 stars 514 forks source link

Suggestion for CriteriaBuilder #458

Closed clebrsonn closed 5 months ago

clebrsonn commented 1 year ago

added criteriabuilder, junction predicate and predicate for create conditions in where and return in string


This change is Reviewable

stohn777 commented 1 year ago

Interestingly following. Unit tests?

clebrsonn commented 1 year ago

Interestingly following. Unit tests?

I'm finishing unit tests. Do you have some ideas for scenario?

stohn777 commented 1 year ago

I'm finishing unit tests. Do you have some ideas for scenario?

fflib_CriteriaBuilderTest class focusing on the output of the toSoql() method. Many variations of the Where clause to cover.

stohn777 commented 1 year ago

As I'm sure you know, this SF Developer topic is likely the canonical reference for the Where-Clause specs.

[1] https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_conditionexpression.htm

clebrsonn commented 1 year ago

As I'm sure you know, this SF Developer topic is likely the canonical reference for the Where-Clause specs.

[1] https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_conditionexpression.htm

Thanks, I'll verify.

clebrsonn commented 1 year ago

@stohn777 I finished the adjustments for the most common cases of where conditions. I based on hibernate and the two open PR's below:

393, 313

daveespo commented 5 months ago

See #483