MySQL introspection: TINYINT is typed as generated<number> - is this by design? #205
Replies: 4 comments
-
... or is it Generated because there is a default value? |
Beta Was this translation helpful? Give feedback.
-
Hello, and thanks for putting this in the Q&A! That column is marked as |
Beta Was this translation helpful? Give feedback.
-
Thanks for the response! 👍 I realised I was barking up the wrong tree as I try to track down why something isn't working as expected :oops: 😬 Typescript can be confusing and kysely-codegen is a lifesaver! |
Beta Was this translation helpful? Give feedback.
-
Appreciated! 🙏 |
Beta Was this translation helpful? Give feedback.
-
Hello,
I just wanted to check whether this might be a bug or, more likely, if I'm just missing something!
With a table like:
the generated type comes out as:
which means I can't insert/update values for sort_order field.
I use the following command:
Why is it typed as
Generated<number | null>
instead ofnumber | null
?Thanks in advance, and thank you for this amazing tool!
[Edit]
Using:
kysely 0.27.4
kysely-codegen 0.16.8
Beta Was this translation helpful? Give feedback.
All reactions