Repository navigation
Conversation
…gates
Backpex.Expr gets +, -, *, /, datetime_diff/3 and to_string/1, and comparisons
take values on both sides, e.g. expr(likes - dislikes > 10). Metrics aggregate
expressions, e.g. {:sum, expr(price * quantity)}. The Ecto adapter and the
in-memory runtime follow the rules of SQL for nil and integer division.
The Ecto adapter joins one subquery for every group of aggregates that only
differ in their value, instead of one per aggregate, e.g. for the name and the
email of the primary partner of a contact.
Backpex.LiveResource.index_query/1 took the fields from the assigns. In an item or resource action they are the fields of the action, so an export sorted and searched by the wrong fields. index_query/1 now takes the fields of the index view of the LiveResource, and index_query/2 the given fields, which the index view passes.
Backpex.Fields.BelongsTo, HasMany and HasManyThrough take :options_sort, a sort like Backpex.Query.sort/2 or a function of the assigns that returns one. Its fields may be computed values of the related items. Before, only the :options_query of the Ecto adapter could sort the options.
A metric that should cover the items of every status while the index view shows one status had to rebuild the query from the filter values in data/3. Metrics now take :ignore_filters, the names of filters that don't limit their items. The index view computes the metrics that ignore the same filters with one query, which data/3 receives, too.
With a bigint, the sum of datetime_diff/3 in a metric was a numeric of PostgreSQL, so Ecto returned a Decimal. As an integer, its sum is an integer, like the sum of other integer fields.
This was referenced Oct 29, 2026
Collaborator
Author
|
Closing: the changes moved into the PRs that introduced the APIs they change.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closed: the changes moved into the PRs that introduced the APIs they change.
:ignore_filtersfor metrics,index_query/1with the index fields (index_query/2with given fields),:options_sortfor association fields+,-,*,/,datetime_diff/3,to_string/1, comparisons of values on both sides, metric aggregates of expressions,:options_sortby computed values