You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.
SOQL doesn't seem to have any obvious default order for the resulting list of SObjects. It'd be nice if there were an option to have QueryBuilder.cls sort by the SObject Type's name field (Schema.Account.Name, Schema.Task.Subject, Schema.Case.CaseNumber, etc) if no other ordering is specified.
The first option for implementing this is to have it controlled by a custom setting. By default, Nebula would not sort the results, but if the custom setting is updated (probably by flipping a boolean field?), then Nebula would sort all queries by name field.
A second option is to add something like a sortQueryResults() method to the query builder implementations. Then the method can be optionally called when someone wants the results to be sorted by name field
new SObjectQueryBuilder()
.setSObjectType(Schema.Account.SObjectType)
.sortQueryResults() // New method to sort the List<SObject> results by the sobj type's name field
had.
A third option is to implement both options one AND two so that there is configurable control of the default behaviour and programmatic control for individual instances of a query builder.
The text was updated successfully, but these errors were encountered:
SOQL doesn't seem to have any obvious default order for the resulting list of SObjects. It'd be nice if there were an option to have QueryBuilder.cls sort by the SObject Type's name field (Schema.Account.Name, Schema.Task.Subject, Schema.Case.CaseNumber, etc) if no other ordering is specified.
The first option for implementing this is to have it controlled by a custom setting. By default, Nebula would not sort the results, but if the custom setting is updated (probably by flipping a boolean field?), then Nebula would sort all queries by name field.
A second option is to add something like a sortQueryResults() method to the query builder implementations. Then the method can be optionally called when someone wants the results to be sorted by name field
The text was updated successfully, but these errors were encountered: