You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior
The parameters should be required because it should be possible to infer that the columns are not nullable!
You can work around this by manually marking the columns as non-nullable, eg VALUES (:name!, :avatar!, :profile!, :phone!, :email!), this generated the correct type:
After some sleuthing I found #118 which seems related. It would be great if simple INSERT statements like these could be supported without having to manually enforcing non-nullability for parameters.
Describe the bug
👋 Perhaps I am misunderstanding something basic, consider this table:
& then we write this query:
Because all of the columns are
NOT NULL
, I would expect all the parameters to be required, however the generated type is:This in turns allows us to easily create a broken query:
Getting the error:
Expected behavior
The parameters should be required because it should be possible to infer that the columns are not nullable!
You can work around this by manually marking the columns as non-nullable, eg
VALUES (:name!, :avatar!, :profile!, :phone!, :email!)
, this generated the correct type:...but why does it not infer it correctly out of the box?
Test case
N/A
The text was updated successfully, but these errors were encountered: