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

Feature Request: Reflection on Indexes & Constraints #7

Open
sitch opened this issue Feb 7, 2022 · 0 comments
Open

Feature Request: Reflection on Indexes & Constraints #7

sitch opened this issue Feb 7, 2022 · 0 comments

Comments

@sitch
Copy link

sitch commented Feb 7, 2022

Would be useful to extract additional info from constraints and indexes.

For instance:

CREATE UNIQUE INDEX <NAME> ON <CONTEXT>.<TABLE> USING <INDEX_METHOD> (<COLUMN>)

Allows you to extract that <CONTEXT>.<TABLE>.<COLUMN> is unique -- can just add a JSDoc comment about uniqueness or a type alias.

https://www.postgresql.org/docs/current/ddl-constraints.html

Additionally, by either reflecting on explicit constraints or <TABLE>_<FOREIGN_KEY> you can infer that there are assoc relationships.

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