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

supabase / supabase-flutter / 41417592519
94%

Build:
DEFAULT BRANCH: main
Ran 02 Nov 2026 09:04AM UTC
Jobs 12
Files 193
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

02 Nov 2026 09:03AM UTC coverage: 94.13% (+0.006%) from 94.124%
41417592519

push

github

web-flow
fix(postgrest): count the rows of a maybeSingle() read from Content-Range (#2113)

## What

Aligns the read side of `maybeSingle()` with the row counting defined in
https://github.com/supabase/sdk/pull/307.

A read or function call with `maybeSingle()` used to count the rows by
the length of a JSON array body, and ignored any other body. It now
takes the count from the range before the `/` in `Content-Range`:

- `*` is 0 rows, so it resolves to `null`.
- `{first}-{last}` is `last - first + 1` rows.
- Without a range in either form, it counts the elements of a JSON array
body, and any other body as one row.

More than one row throws the same 406 `PGRST116` exception as before,
and one row resolves to the single element of a one-element array, or to
the body itself. A `HEAD` request now goes through the same counting.

The read or write check that decides whether `maybeSingle()` sends the
object `Accept` header is now one getter. The parser uses the same
getter, so the two can no longer disagree.

## Note

`maybeSingle()` resolves to `PostgrestMap?`. A function returning an
array value, such as `RETURNS int[]`, is counted as one row as the spec
requires, but its array body cannot be cast to that type. The call used
to fail with a `PGRST116` for a multi-element array and now fails with a
cast error instead.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Bug Fixes**
* `maybeSingle()` now handles row counts consistently for reads and
function calls. It returns `null` when no rows match, returns the row
when exactly one matches, and reports an error when multiple rows are
found.
* Row counts are determined using response metadata when available, with
the response body as a fallback. Offset ranges and HEAD requests are
also handled correctly.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

22 of 22 new or added lines in 2 files covered. (100.0%)

12539 of 13321 relevant lines covered (94.13%)

6.64 hits per line

Jobs
ID Job ID Ran Files Coverage
3 supabase_flutter - 41417592519.3 02 Nov 2026 09:05AM UTC 16
89.03
GitHub Action Run
4 iceberg - 41417592519.4 02 Nov 2026 09:05AM UTC 7
99.72
GitHub Action Run
5 supabase - 41417592519.5 02 Nov 2026 09:08AM UTC 21
94.52
GitHub Action Run
6 supabase_functions - 41417592519.6 02 Nov 2026 09:04AM UTC 4
94.01
GitHub Action Run
7 postgrest - 41417592519.7 02 Nov 2026 09:07AM UTC 30
92.86
GitHub Action Run
8 supabase_typegen - 41417592519.8 02 Nov 2026 09:06AM UTC 6
94.44
GitHub Action Run
9 supabase_realtime - 41417592519.9 02 Nov 2026 09:07AM UTC 14
92.0
GitHub Action Run
10 supabase_storage - 41417592519.10 02 Nov 2026 09:06AM UTC 13
95.96
GitHub Action Run
11 supabase_test - 41417592519.11 02 Nov 2026 09:05AM UTC 9
93.55
GitHub Action Run
12 supabase_auth - 41417592519.12 02 Nov 2026 09:09AM UTC 34
94.21
GitHub Action Run
3 yet_another_json_isolate - 40346664947.3 26 Oct 2026 03:11PM UTC 2
98.65
GitHub Action Run
2 supabase_common - 40911627463.2 29 Oct 2026 04:28PM UTC 37
94.39
GitHub Action Run
Source Files on build 41417592519
  • Tree
  • List 193
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #41417592519
  • e19c2626 on github
  • Prev Build on main (#41415585765)
  • Next Build on main (#41422289225)
  • 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