Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(typegen): relationships for views #580

Merged
merged 3 commits into from
May 24, 2023
Merged

Conversation

soedirgo
Copy link
Member

@soedirgo soedirgo commented May 22, 2023

What kind of change does this PR introduce?

Generate types for relationships from views to tables, tables to views, and views to views. Most of the logic for this comes from https://github.com/PostgREST/postgrest/blob/main/src/PostgREST/SchemaCache.hs

What is the current behavior?

Only relationships between tables are generated.

What is the new behavior?

All relationships except computed relationships are supported.

Additional context

supabase/postgrest-js#303

It's unused, and it no longer serves as a unique identifier once
combined with view relationships
@soedirgo soedirgo requested review from a team as code owners May 22, 2023 11:08
Generate types for relationships from views to tables, tables to views,
and views to views.
@soedirgo soedirgo merged commit 80809c7 into master May 24, 2023
4 checks passed
@soedirgo soedirgo deleted the feat/view-relationships branch May 24, 2023 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants