Query.apex

Query.apex provides a flexible and dynamic way of building a SOQL query on the Salesforce platform.

Why Query.apex?

Although Salesforce provides Database.query method to dynamically execute a query from a string, it is far from easy to construct such a string in a structural and flexible way. Query.apex is designed to improve the flexibility of the code and consequently enhance the productivity of the development.

Programming Paradigm

Allows both functional programming and object oriented programming paradigm

Completeness

Supports complex queries including parent/child relationships, and nested conditions in a flexible way

Salesforce platform friendliness

Manages the namespace of the object names and field names, while also providing the Field Level Security checking

Start from small steps

It's about changing your tranditional query string into a structural way

Starting from trying each feature, before combining all of them, would be advisable

Try our tutorial for a quick start

Function Chaining

Query.apex supports declarative style function chaining

Function Chaining

Friendliness

Query.apex aims enhance the productivity of the development by providing friendly APIs

Collection Support

Complex Condition Support

Query.apex allows complex condition in a functional style

Function Composition