supabase-swift icon indicating copy to clipboard operation
supabase-swift copied to clipboard

Generate models from database tables

Open bryan-vh opened this issue 1 year ago • 1 comments

Feature request

I'm wondering if it's possible to generate model types (preferably structs) from the database tables. Is there any effort to implement this or is assumed that API consumers will have to create their own models from scratch to mimic the tables on the backend?

bryan-vh avatar Feb 10 '24 21:02 bryan-vh

Hi @bryan-vh,

We don't support this yet, but it is on the radar.

I'll keep the issue open, and post updates here once we have any.

Thank you!

grdsdev avatar Feb 12 '24 08:02 grdsdev

Quick update on this:

I'm working on a generator for Swift on https://github.com/supabase/postgres-meta/pull/779, for now, it only generates plain Swift structs that can be used to encode/decode Postgres Response.

grdsdev avatar Jun 19 '24 11:06 grdsdev