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

supabase / supabase-swift / 33442426277
88%

Build:
DEFAULT BRANCH: main
Ran 31 Aug 2026 09:42PM UTC
Jobs 1
Files 119
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

31 Aug 2026 09:38PM UTC coverage: 87.34% (+0.05%) from 87.294%
33442426277

push

github

web-flow
feat(postgrest): add embedded relations to the column namespace (#1295)

* feat(postgrest): add embedded relations to the column namespace

`PostgrestToOneRelation`/`PostgrestToManyRelation` sit on a relation's `Columns`
namespace and project a column through the embed: `orders(total)` in a `select`
list. They come from the postgres-meta-backed generator or a hand-written
namespace — `@Table` cannot synthesize them, since a macro cannot see
foreign-key metadata.

Cardinality reaches the type system because the server distinguishes it:
`order=parent(id).asc` is fine, while the to-many direction is PGRST118 "do not
form a many-to-one or one-to-one relationship". So a to-one projection is
orderable and a to-many projection is not.

An embedded projection renders `parent(title)`, so a cast, JSON path or
aggregate on one has to land *inside* those parentheses — PostgREST 16.1
answers 200 and silently drops anything outside them. Rather than each embedded
column type shadowing the eight accessors it inherits, which is 24 declarations
that nothing keeps in step with a ninth accessor, two pieces carry the rule:

- `PostgrestColumnExpression` gains one hook, `_deriving(_:)`, which places a
  derivation where the server expects it. Non-embedded expressions get a
  default that appends; each embed kind overrides it once.
- A phantom `Position` associated type carries where an expression may appear,
  so a derivation inherits its receiver's positions instead of restating them.
  `PostgrestDerivedExpression` conforms to the filterable and orderable
  protocols conditionally on it, which makes a derivation's position the
  intersection of the accessor's and the receiver's.

One `PostgrestDerivedExpression` therefore replaces `PostgrestCastColumn`,
`PostgrestJSONPath` and `PostgrestAggregate`, and no fifth type is needed to
keep a to-one chain inside the parentheses. The eight accessors are declared
once each: 32 public accessor declarations across `Columns/` become... (continued)

66 of 66 new or added lines in 5 files covered. (100.0%)

9562 of 10948 relevant lines covered (87.34%)

178.85 hits per line

Jobs
ID Job ID Ran Files Coverage
1 33442426277.1 31 Aug 2026 09:42PM UTC 119
87.34
GitHub Action Run
Source Files on build 33442426277
  • Tree
  • List 119
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #33442426277
  • 4253a08a on github
  • Prev Build on main (#33426233535)
  • Next Build on main (#33488742833)
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