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

supabase / supabase-flutter / 37465783234
92%

Build:
DEFAULT BRANCH: main
Ran 06 Oct 2026 12:48PM UTC
Jobs 11
Files 173
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

06 Oct 2026 12:46PM UTC coverage: 91.487% (+0.03%) from 91.453%
37465783234

push

github

web-flow
fix(postgrest): read a JSON path ending in an array index under the key PostgREST answers with (#1915)

## Summary

A typed JSON path that ends in an array index always reads back `null`
from a `PostgrestPartialRow`.

```dart
final firstTag = Orders.metadata.jsonObject('tags').jsonText('0');

final row = await client.table(Orders.table).selectOnly([firstTag]).single();
row.read(firstTag); // null, although the response holds {"tags": "urgent"}
```

`jsonText` and `jsonObject` use the path segment they were given as the
response key, so the row is read under `'0'`. PostgREST does not name
the value after an index. It uses the last key of the path, and the
column name when the path has no key ([`lastJsonKey` in
`Plan.hs`](https://github.com/PostgREST/postgrest/blob/main/src/library/PostgREST/Plan.hs#L495-L503)):

```haskell
-- `select=data->1->mycol->>2`, we need to show the result as [ {"mycol": ..}, {"mycol": ..} ]
-- `select=data->3`, we need to show the result as [ {"data": ..}, {"data": ..} ]
```

Nothing throws, because the entry was selected, so the lookup just
misses.

The fix keeps the key of the expression the path was applied to when the
segment is an index. An index is an optional `-` followed by digits, the
same rule PostgREST's parser applies ([`pJIdx` in
`QueryParams.hs`](https://github.com/PostgREST/postgrest/blob/main/src/library/PostgREST/ApiRequest/QueryParams.hs)).
All `jsonText` and `jsonObject` implementations go through one helper:
stored columns, computed fields, chained JSON paths and derived
expressions.

| Expression | Sent | Read under, before | Read under, after |
| -- | -- | -- | -- |
| `metadata.jsonText('gift')` | `metadata->>gift` | `gift` | `gift` |
| `metadata.jsonText('0')` | `metadata->>0` | `0` | `metadata` |
| `metadata.jsonObject('tags').jsonText('0')` | `metadata->tags->>0` |
`0` | `tags` |
| `metadata.jsonObject('items').jsonObject('-1')` |
`metadata->items->-1` | `-1` | `items` |
|
`metadata.jsonObject('items')... (continued)

62 of 64 new or added lines in 7 files covered. (96.88%)

9318 of 10185 relevant lines covered (91.49%)

5.15 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
87.3
10.83% packages/postgrest/lib/src/postgrest_derived_expression.dart
Jobs
ID Job ID Ran Files Coverage
3 supabase_flutter - 37465783234.3 06 Oct 2026 12:48PM UTC 15
81.0
GitHub Action Run
4 supabase - 37465783234.4 06 Oct 2026 12:52PM UTC 18
94.27
GitHub Action Run
5 iceberg - 37465783234.5 06 Oct 2026 12:48PM UTC 6
68.57
GitHub Action Run
6 supabase_typegen - 37465783234.6 06 Oct 2026 12:50PM UTC 24
96.22
GitHub Action Run
7 supabase_storage - 37465783234.7 06 Oct 2026 12:50PM UTC 9
98.1
GitHub Action Run
8 supabase_realtime - 37465783234.8 06 Oct 2026 12:51PM UTC 13
90.67
GitHub Action Run
9 postgrest - 37465783234.9 06 Oct 2026 12:52PM UTC 29
93.55
GitHub Action Run
10 supabase_auth - 37465783234.10 06 Oct 2026 12:52PM UTC 32
92.07
GitHub Action Run
11 supabase_functions - 37465783234.11 06 Oct 2026 12:48PM UTC 4
96.04
GitHub Action Run
6 supabase_common - 37446858483.6 06 Oct 2026 10:02AM UTC 22
87.55
GitHub Action Run
6 yet_another_json_isolate - 36864123641.6 01 Oct 2026 12:48PM UTC 1
98.44
GitHub Action Run
Source Files on build 37465783234
  • Tree
  • List 173
  • Changed 12
  • Source Changed 12
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #37465783234
  • cb12a186 on github
  • Prev Build on main (#37462558256)
  • Next Build on main (#37467066164)
  • 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