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

supabase / supabase-flutter / 39624049069
93%

Build:
DEFAULT BRANCH: main
Ran 21 Oct 2026 03:17PM UTC
Jobs 11
Files 174
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

21 Oct 2026 03:15PM UTC coverage: 91.762% (-0.1%) from 91.859%
39624049069

push

github

web-flow
feat(supabase): add typed onTableChanges for postgres changes (#2003)

Resolves SDK-2311.

The typed `stream()` and `streamOnly()` cover "the current rows, kept up
to date". For event-shaped use cases (reacting to an insert, comparing
old and new values, listening to one event type, or skipping the initial
fetch on a high-volume table), users still had to drop down to the
untyped `onPostgresChanges`, with string table and column names and
`Map<String, dynamic>` records.

This adds a typed counterpart as an extension on `RealtimeChannel`, in
`packages/supabase` so `supabase_realtime` keeps no dependency on
postgrest:

```dart
final channel = supabase.channel('room-200');
channel
    .onTableChanges(Messages.table, filters: [Messages.roomId.eq(200)])
    .listen((change) {
      switch (change) {
        case TypedPostgresInsert(:final newRow):
          showToast(newRow.body);
        case TypedPostgresUpdate(:final newRow, :final oldRow):
          if (oldRow.read(Messages.status) != newRow.status) {
            // ...
          }
        case TypedPostgresDelete(:final oldRow):
          remove(oldRow.read(Messages.id));
      }
    });
channel.subscribe();
```

## Changes

- `onTableChanges(table, event:, filters:)` emits a sealed
`TypedPostgresChange<Row, Element>`: `TypedPostgresInsert`,
`TypedPostgresUpdate` or `TypedPostgresDelete`. The new row is decoded
through `PostgrestTable.rowFromJson`.
- `onTableChangesOnly(table, columns:, ...)` sends `columns` plus the
primary key as the realtime `select`, and the new row is a
`PostgrestPartialRow` read through those columns, mirroring
`streamOnly`.
- `oldRow` is a `PostgrestPartialRow`, because realtime sends only the
primary key unless the table has `REPLICA IDENTITY FULL` and no row
level security. A new internal `PostgrestPartialRow.fromPresentColumns`
makes any stored column the payload holds readable, and reading a
missing one throws the usual `StateError` listing the columns that are
there.
- The... (continued)

102 of 119 new or added lines in 7 files covered. (85.71%)

10704 of 11665 relevant lines covered (91.76%)

5.39 hits per line

Uncovered Changes

Lines Coverage ∆ File
7
94.85
-5.15% packages/postgrest/lib/src/postgrest_filter.dart
7
87.5
packages/supabase/lib/src/typed_postgres_changes.dart
3
86.05
-6.06% packages/postgrest/lib/src/postgrest_partial_row.dart
Jobs
ID Job ID Ran Files Coverage
3 supabase_typegen - 39624049069.3 21 Oct 2026 03:17PM UTC 6
94.36
GitHub Action Run
4 supabase_flutter - 39624049069.4 21 Oct 2026 03:17PM UTC 16
80.85
GitHub Action Run
5 supabase_realtime - 39624049069.5 21 Oct 2026 03:19PM UTC 14
91.17
GitHub Action Run
6 supabase_functions - 39624049069.6 21 Oct 2026 03:17PM UTC 4
93.28
GitHub Action Run
7 postgrest - 39624049069.7 21 Oct 2026 03:19PM UTC 28
91.94
GitHub Action Run
8 iceberg - 39624049069.8 21 Oct 2026 03:17PM UTC 6
71.32
GitHub Action Run
9 supabase - 39624049069.9 21 Oct 2026 03:19PM UTC 20
93.48
GitHub Action Run
10 supabase_auth - 39624049069.10 21 Oct 2026 03:21PM UTC 34
93.38
GitHub Action Run
11 supabase_storage - 39624049069.11 21 Oct 2026 03:19PM UTC 10
96.26
GitHub Action Run
9 yet_another_json_isolate - 39603824352.9 21 Oct 2026 12:58PM UTC 1
98.44
GitHub Action Run
11 supabase_common - 39605471296.11 21 Oct 2026 01:10PM UTC 35
93.58
GitHub Action Run
Source Files on build 39624049069
  • Tree
  • List 174
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #39624049069
  • 74e9870b on github
  • Prev Build on main (#39619309191)
  • Next Build on main (#39625362934)
  • 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