Replies: 1 comment
-
Maybe something like $value as non standard sql would be useful |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey I noticed I am bumping into issue with inserting stuff in drizzle. When I mess up(which happens a lot, I am a messy kind of developer) I often get type errors which are full on misleading/wrong.
Let me ilustrate-I have this insert:
and types are wrong for it. Typescript is telling me that
symbol
does not exist.I check my schema and it does exist-look:

so what is going on?

Well actually my type errors are these three fields:
but because drizzle types overload
.insert().values()
with two types:typescript is unable to give you the correct type error.
Now I agree this could be an issue with typescript, but I also believe that unless typescript fixes it, it would be better to stop overloading
values
with two types and introduce a new.insert().value()
method.Doing so will greatly enhance DX when inserting bad types into tables with drizzle.
So my question is-can you do this tiny but hugely breaking change for people who vote yes on this poll?
9 votes ·
Beta Was this translation helpful? Give feedback.
All reactions