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

supabase / supabase-swift / 32873232778
87%

Build:
DEFAULT BRANCH: main
Ran 25 Aug 2026 04:42PM UTC
Jobs 1
Files 109
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

25 Aug 2026 04:39PM UTC coverage: 87.054% (-0.008%) from 87.062%
32873232778

push

github

web-flow
fix(postgrest): let Update change a primary key column (#1280)

* fix(postgrest): let Update change a primary key column

`Update` dropped primary-key columns along with `Insert`, so a key could
never be changed through the typed API. Renaming a natural key — the
`slug` in a table keyed on `(tenant_id, slug)` — meant dropping to the
legacy builder.

The exclusion protected nothing. `update(_:)` returns a mutation the
caller filters separately, so targeting and payload are independent
concerns; the doc on `update(_:)` already warns that with no filter it
touches every row. Holding the key back did not keep a write from
rewriting identity, it only removed the ability to do so deliberately.

`Update` now carries every column, all optional as before, so a caller
that does not name the key is unaffected and the column stays out of the
request body.

That leaves `isPrimaryKey` used for exactly one thing — making the key
optional rather than required in `Insert` — which is what the marker
should have meant all along.

Fixes SDK-1607

Co-Authored-By: Claude <noreply@anthropic.com>

* feat(postgrest): give @PrimaryKey a job — report the key columns

Review of #1280, finding 1. The review found `isPrimaryKey` down to a single
use, sitting in an `||` next to `hasDefault`, so `@PrimaryKey var id: Int` and
`@Default var id: Int` expanded identically. Rebasing onto the revised #1278 —
which dropped `|| isPrimaryKey` from the `Insert` rule — removed that use too.
Combined with this PR taking the key out of the `Update` filter, the marker had
**zero** behavioural effect: writing it or omitting it expanded byte-for-byte
the same.

Verified after the rebase: `grep -n isPrimaryKey Sources/` returns only the
declaration and the attribute read. Nothing consumed it.

The review named two ways out. The first — differentiate it from `@Default` —
already happened on #1278, and it is what emptied the marker rather than
filling it. The second was to give `@PrimaryKey` something... (continued)

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

1 existing line in 1 file now uncovered.

9199 of 10567 relevant lines covered (87.05%)

1016260.92 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
0.0
Sources/PostgREST/Relations/PostgrestRelation.swift

Coverage Regressions

Lines Coverage ∆ File
1
80.0
0.0% Sources/PostgREST/Query/PostgrestTypedMutation.swift
Jobs
ID Job ID Ran Files Coverage
1 32873232778.1 25 Aug 2026 04:42PM UTC 109
87.05
GitHub Action Run
Source Files on build 32873232778
  • Tree
  • List 109
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #32873232778
  • 62bb21be on github
  • Prev Build on main (#32842924889)
  • Next Build on main (#32960210887)
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