-
Notifications
You must be signed in to change notification settings - Fork 11
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
Not-nullable fields in materialized view #29
Comments
Good point! Currently there’s no way to override what sqltyper has inferred. What do you think would be the best way mark the fields non-billable? |
I don't know of any way to annotate selected fields using PostgreSQL's syntax. For example:
Would allow to keep |
Seems you can get the underlying query of a (materialized) view, at least using the |
Created a new issue to track this: #43 |
In order for the TS types to not be marked as nullable the table constraints are looked up as far as I understand.
However when dealing with materialized views there is no way to mark a field as non-nullable.
I understand that there is no way to guarantee that there is no null values in the materialized view, however as a developer I often know that based on how the view is generated.
I just wanted to ask if there is any way to mark a field as not nullable explicitly rather than relying on the DB introspection, since it means I have to manually rewrite most type definitions on materialized views which makes the use of this tool pointless for the use-case.
Thanks for the help.
The text was updated successfully, but these errors were encountered: