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

supabase / supabase-swift / 32830303852
87%

Build:
DEFAULT BRANCH: main
Ran 25 Aug 2026 09:12AM UTC
Jobs 1
Files 108
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 09:08AM UTC coverage: 87.034% (-0.2%) from 87.22%
32830303852

push

github

web-flow
feat(postgrest): add @SelectionOf for column subsets (#1260)

* feat(postgrest): add @SelectionOf for column subsets

The expansion emits references to the relation's own columns, so a
property that names no column on it is a compile error. Embeds via
@Relationship are deliberately out of scope for this slice.

Also closes the hole the RFC's headline decision 8 asks for and the
protocol did not enforce. `PostgrestSelection` gains `associatedtype
Source: PostgrestRelation`, fixed to `Self` by a same-type constraint on
the `PostgrestRelation` refinement, so a hand-written relation conformance
declares nothing new. `select(_:)` is then gated on `S.Source == R`, and
handing a selection to the wrong relation is no such overload rather than
a PostgREST 400.

@SelectionOf follows the same two rules @Table had to learn: everything is
emitted from the extension role, and the inheritance clause names the
whole refinement chain. The shared `codingKeys` and `inheritanceClause`
helpers move to Support/Generation.swift so a relation and a selection of
it cannot spell the same column differently.

* chore(compliance): register @SelectionOf and the selection source

`PostgrestTypedSource.select` is already attributed to
database.query.select, and the new overload shares that symbol name, so
only the macro attribute and the new associated type are added.

* fix(postgrest): read a selection's columns from the relation, not its own names

A selection knows its property names; it does not know what column the
relation maps them to. `selectString` snake-cased locally, which is wrong the
moment the relation carries a `@Column`:

    @Table("todos")
    struct Todo {
      @Column("due_at") var dueDate: Date?
    }

    @SelectionOf(Todo.self)
    struct TodoDueDate {
      var dueDate: Date?      // asked PostgREST for `due_date`
    }

Verified before the fix: `selectString` was `"due_date"` while
`SelectionTodo.columnName(for: \.dueDate)` was `"due_at"`. PostgREST would
... (continued)

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

17 existing lines in 1 file now uncovered.

9196 of 10566 relevant lines covered (87.03%)

45.39 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
66.67
-33.33% Sources/PostgREST/Query/PostgrestTypedSource.swift

Coverage Regressions

Lines Coverage ∆ File
17
63.98
-4.57% Sources/RealtimeV2/WebSocket/URLSessionWebSocket.swift
Jobs
ID Job ID Ran Files Coverage
1 32830303852.1 25 Aug 2026 09:12AM UTC 108
87.03
GitHub Action Run
Source Files on build 32830303852
  • Tree
  • List 108
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #32830303852
  • f47933e7 on github
  • Prev Build on main (#32828369732)
  • Next Build on main (#32831138299)
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