• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase-flutter / 39428007061
92%

Build:
DEFAULT BRANCH: main
Ran 20 Oct 2026 01:10PM UTC
Jobs 11
Files 164
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Oct 2026 01:09PM UTC coverage: 91.988% (-0.01%) from 92.002%
39428007061

push

github

web-flow
fix(postgrest)!: key aggregates and casts by their own expression (#1988)

## What

On the typed surface, aggregates and casts are now sent under an alias
of their own expression and read back under that key, the same way JSON
paths already are since #1915.

```
select([Orders.id.sum(), Orders.amount.sum()])
before: select=id.sum(),amount.sum()                      -> {"sum": 6, "sum": 40}
after:  select="id.sum()":id.sum(),"amount.sum()":amount.sum() -> {"id.sum()": 6, "amount.sum()": 40}
```

## Why

Aggregates came back under the function name, so two aggregates of the
same function in one `select` collided and `jsonDecode` kept the last. A
cast came back under the key of the column it cast, so a column and its
cast in one `select` collided too. Reads go through
`PostgrestPartialRow.read(entry)`, which follows `responseKey`, so
nothing changes for typed reads.

This replaces the public `alias(String)` originally proposed in
SDK-1757: with reads going through the entry the response key is an
internal detail, and embeds can already be renamed through `alias` on
the relation.

## Changes

- `sum()`, `avg()`, `min()`, `max()`, `count()`, `countAll()` and
`cast()` are keyed by their whole expression and aliased in the `select`
list, at the top level and inside an embed,
`todo("amount.sum()":amount.sum())`.
- The per-derivation key override (`_castKey` and the `key:` parameter
of `_derive`) is gone, since every derivation is now keyed the same way.
- The dartdocs no longer warn about colliding aggregates and casts.

## Breaking

Code reading the raw response map, `row['sum']` or a cast under its
source column name, now needs the expression as the key. The typed
surface is `@experimental`.

## Verification

Against the local stack, with `pgrst.db_aggregates_enabled` turned on
temporarily, PostgREST accepts and answers under the quoted alias for
every form sent here: each aggregate, `count()`, a cast of an aggregate,
grouping by a plain column next to an a... (continued)

18 of 21 new or added lines in 3 files covered. (85.71%)

1 existing line in 1 file now uncovered.

10173 of 11059 relevant lines covered (91.99%)

5.5 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
80.65
-1.71% packages/postgrest/lib/src/postgrest_derived_expression.dart

Coverage Regressions

Lines Coverage ∆ File
1
80.65
-1.71% packages/postgrest/lib/src/postgrest_derived_expression.dart
Jobs
ID Job ID Ran Files Coverage
3 supabase_storage - 39428007061.3 20 Oct 2026 01:12PM UTC 10
96.26
GitHub Action Run
4 supabase_flutter - 39428007061.4 20 Oct 2026 01:11PM UTC 16
80.85
GitHub Action Run
5 supabase_functions - 39428007061.5 20 Oct 2026 01:10PM UTC 4
93.28
GitHub Action Run
6 iceberg - 39428007061.6 20 Oct 2026 01:11PM UTC 6
71.32
GitHub Action Run
7 supabase_auth - 39428007061.7 20 Oct 2026 01:14PM UTC 34
93.38
GitHub Action Run
8 supabase_typegen - 39428007061.8 20 Oct 2026 01:11PM UTC 6
96.32
GitHub Action Run
9 supabase - 39428007061.9 20 Oct 2026 01:14PM UTC 17
93.84
GitHub Action Run
10 postgrest - 39428007061.10 20 Oct 2026 01:13PM UTC 32
93.87
GitHub Action Run
11 supabase_realtime - 39428007061.11 20 Oct 2026 01:13PM UTC 14
91.17
GitHub Action Run
4 supabase_common - 39426381035.4 20 Oct 2026 12:59PM UTC 24
87.62
GitHub Action Run
7 yet_another_json_isolate - 39234881764.7 19 Oct 2026 10:06AM UTC 1
98.44
GitHub Action Run
Source Files on build 39428007061
  • Tree
  • List 164
  • Changed 6
  • Source Changed 6
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #39428007061
  • 5609af7f on github
  • Prev Build on main (#39426381035)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc