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

supabase / supabase-flutter / 31095684885
89%

Build:
DEFAULT BRANCH: main
Ran 06 Aug 2026 11:04AM UTC
Jobs 9
Files 103
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 Aug 2026 11:02AM UTC coverage: 87.087%. Remained the same
31095684885

push

github

web-flow
fix!: make order() default to ascending (#1658)

Closes #1638

## What kind of change does this PR introduce?

Breaking change.

## What is the current behavior?

`order()` defaults `ascending` to `false` in two places, so omitting the
parameter sorts descending:

- `PostgrestTransformBuilder.order()`
- `SupabaseStreamBuilder.order()`

`.order('created_at')` therefore returns newest rows first, which
disagrees with SQL's `ORDER BY` (defaults to `ASC`) and with
`postgrest-js` (`{ ascending = true }`). The failure is silent: the
query succeeds, the row count and types are right, only the order is
wrong.

The default was never chosen for Dart. `postgrest-dart` `7a8f8b7`
(2020-09-10) ported the first `order()` from the pre-TypeScript
`postgrest-js`, which then had `order(columnName, ascending = false,
nullsFirst = false)`. `postgrest-js` `2960d09` moved to `{ ascending =
true }` ten days later and Dart never followed. #1637 documented the
current behavior in the meantime.

Two examples in this repository were already wrong because of it, which
is the clearest evidence that the default surprises people:

- `examples/realtime_room/lib/room_repository.dart` says "SELECT the
existing messages once, oldest first" and returned them newest first.
- `examples/database_crud/lib/tasks_repository.dart` says "ordered
alphabetically by name" and returned projects in reverse alphabetical
order.

Both are now correct without touching their query code.

## What is the new behavior?

- `PostgrestTransformBuilder.order()`: `bool ascending = true`.
- `SupabaseStreamBuilder.order()`: `bool ascending = true`, so
`.stream()` and `.select()` agree on what an unqualified `.order()`
means.
- Doc comments on both state the default and drop the note about
diverging from SQL and `postgrest-js`, since there is no longer a
divergence.

`nullsFirst` is unchanged at `false`. That already matched
`postgrest-js` and PostgREST.

## Migration

`MIGRATION.md` gets an `order() now sorts ascen... (continued)

1 of 1 new or added line in 1 file covered. (100.0%)

5618 of 6451 relevant lines covered (87.09%)

4.05 hits per line

Jobs
ID Job ID Ran Files Coverage
7 postgrest - 31095684885.7 06 Aug 2026 11:06AM UTC 10
85.35
GitHub Action Run
8 supabase - 31095684885.8 06 Aug 2026 11:07AM UTC 17
85.63
GitHub Action Run
9 supabase_flutter - 31095684885.9 06 Aug 2026 11:04AM UTC 10
79.38
GitHub Action Run
3 supabase_common - 31089994561.3 06 Aug 2026 09:41AM UTC 10
100.0
GitHub Action Run
8 gotrue - 31089994561.8 06 Aug 2026 09:44AM UTC 28
87.65
GitHub Action Run
9 realtime_client - 31089994561.9 06 Aug 2026 09:43AM UTC 11
90.19
GitHub Action Run
2 functions_client - 31089994561.2 06 Aug 2026 09:41AM UTC 3
98.86
GitHub Action Run
1 yet_another_json_isolate - 31089994561.1 06 Aug 2026 09:41AM UTC 1
93.65
GitHub Action Run
5 storage_client - 31089994561.5 06 Aug 2026 09:43AM UTC 13
84.59
GitHub Action Run
Source Files on build 31095684885
  • Tree
  • List 103
  • Changed 17
  • Source Changed 17
  • Coverage Changed 11
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #31095684885
  • e06f2302 on github
  • Prev Build on main (#31089994561)
  • Next Build on main (#31109618140)
  • 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