A dynamic, object-oriented SOQL and SOSL query builder for the Salesforce Apex platform.
Query.apex is a dynamic SOQL and SOSL query builder library for the Salesforce Apex platform. It provides an object-oriented, method-chaining API to construct database queries programmatically, solving the problem of error-prone string concatenation and manual security checks. It enhances developer productivity by offering a flexible, type-safe way to build complex queries with relationships, conditions, and aggregate functions.
Salesforce developers and Apex programmers who need to write dynamic, secure, and maintainable database queries within the Salesforce ecosystem.
Developers choose Query.apex because it eliminates the risk of SOQL injection, automatically enforces Salesforce's Object and Field Level Security, and provides a fluent, intuitive API for building even the most complex queries without resorting to fragile string manipulation.
A dynamic SOQL and SOSL query builder on Salesforce.com platform
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Enforces Object and Field Level Security by default and prevents SOQL injection without manual escaping, as shown in the enforceSecurity() method examples that throw exceptions on missing permissions.
Uses method chaining to intuitively build nested conditions, subqueries, and relationships, demonstrated in examples like addCondition with doOr and doAnd for complex logic.
Provides debug() and toQueryString() methods for easy query inspection and logging during development, allowing developers to trace query construction step-by-step.
SOSL features are explicitly noted as in active development in the README, making it unsuitable for applications that rely heavily on search functionality right away.
Adds an external dependency and requires familiarity with its API, which can be verbose for simple static queries compared to inline SOQL, potentially increasing code size and complexity.