Tags: jongpie/NebulaQueryAndSearch
Tags
Fixes Set handling in filterWhere (#44) * Fixes #43 by upgrading SOQl.cls to API version 58, where Set<T> always implements Iterable<T> to simplify string joining for Set operators * Bumped all metadata to API v58.0 (Summer '23 release) * Updated all references to classes & enums in the Schema & System namespaces to explicitly include the namespaces
New unlocked packages (with and without namespace) (#39) * Simplified directory structury within nebula-query-and-search directory * Created 2 unlocked packages (no namespace and Nebula namespace) * Added package.json, added or updated several other project config files (.forceignore, .gitignore, .prettierrc, etc) * Bumped all Apex classes to API v57.0 (Spring '23) * Added @SuppressWarnings tests in Apex classes (several will eventually be removed after refactoring) and added missing curly braces prior to running prettier * Ran prettier on the whole repo * Changed casing of class names from Soql & Sosl to SOQL & SOSL * Added ApexDocs comments to the top of each class + added precommit hook & npm script & dependencies for generating docs markdown * Added Apex test suite, cleaned up test classes and added a few more test methods * Updated most classes, enums, and methods from public to global, updated doc-generation to only include items marked as global * Added Apex script with some sample queries
Summer '18 - v3 rewrite
There are now 3 builder classes (SobjectQueryBuilder, AggregateQueryBuilder & SearchBuilder) and 2 abstract classes (Soql & Sosl).
* Upgraded to API v43.0
* Converted Soql.cls to an abstract class with shared logic + enums + subclasses
* The old (but improved) AggregateResultQueryBuilder is back as AggregateQueryBuilder
* (Re-)created SobjectQueryBuilder.cls
* Polymorphic fields now have the sobject type added to the query
Ex: addField(Lead.OwnerId) --> "Owner.Name, Owner.Type, OwnerId" are added to the query
* Renamed includeChildrenRecords & getChildrenRecordsQuery methods
* Added SearchBuilder.getSobjectTypes()
* Simplified all aggregate methods into a few addAggregateField methods
* Added support for rollup & dimesion groupings in aggregate queries
* Renamed method useGroupingDimension to usingGroupingDimension
* Added support for 'HAVING' keyword in aggregates
* Added Soql.Operator enum to finally replace String operator
* Added support for OR filters in the Soql builder classes
* Replaced strings needed for Soql.DateLiteral with some enums
* Added getFormattedValue() to Soql.QueryFilter
* Added support for date functions (including convertTimeZone) in QueryField
* Added AggregateQueryBuilder.getResultCount()
Soql.cls Enhancements
* Added new enum value, `Soql.FieldCategory.IGNORE_FLS`. This can be used to add a field to a query, regardless of the field-level security (FLS)
* Added 2 new overloaded versions of filterWhere method
* `public Soql filterWhere(QueryFilter filter)`
* `public Soql filterWhere(List<QueryFilter> filters)`
* Created 2 new subclasses
* `Soql.QueryArgument` - takes an Object and formats it to use in a query
* `Soql.QueryFilter` - represents a single where clause filter
Rewrote & simplified the whole project Everything has been simplified to just 2 classes: Soql.cls and Sosl.cls. The previous implementation had a growing number of interfaces & classes, so it was a fairly heavy package to install & learn to use. Rewriting and simplifying the library makes it easier to deploy & easier to learn.
Nebula query engine The Nebula project (https://github.com/jongpie/NebulaFramework) has added a lot of new features for dynamic querying, but it's currently dependent on the rest of the Nebula framework. The query engine from Nebula has been ported so that it's a freestanding project that can be deployed without the rest of the framework.
Move query & search execution back to SObjectRepository (#19) * Created SOQLUtils class to handle parsing a List<Object> into the formatted expected by SOQL for each data type * Moved query & search execution back to SObjectRepository * Deleted some old classes
Implement dynamic SOSL (#12) Added the metho SObjectRepository.getSearchQuery(String searchTerm, SObjectRepository.SearchGroup searchGroup); Made several private methods to build to the individual components. getQuery and getSearchQuery methods call these methods where needed to build each type of query string Added new enum, SObjectRepository.SearchGroup. This is used to control what fields are searched for SOSL queries Added ISObjectRespository.List<SObject> searchInAllFields(String searchTerm); to require one basic SOSL method per object Renamed/tweaked some existing methods Added some missing & new test classes/methods