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

Implicit foreign key joins #167

Open
KyGost opened this issue Apr 26, 2022 · 0 comments
Open

Implicit foreign key joins #167

KyGost opened this issue Apr 26, 2022 · 0 comments

Comments

@KyGost
Copy link
Member

KyGost commented Apr 26, 2022

Being able to query tables with partner tables as if they were the same table would be pretty cool.

Not sure if this should be allowed for one-to-many tables.

Example:

SELECT
  person.id,
  person.name,
  person.phone,
  emergency_contact.name,
  emergency_contact.phone
FROM
  person

where

CREATE TABLE person (
  id UINT PRIMARY KEY,
  name SMALL_TEXT,
  phone SMALL_TEXT,
  emergency_contact_id INT FOREIGN KEY REFERENCES person (id)
)
-- Foreign Key doesn't need to be same table, better example could have been used
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

No branches or pull requests

1 participant