Select by id?
With this code:
I get type script error on in in query:
any clue how to fix it?
5 Replies
actually, I can't pass either a string or an int there, I used kenel to introspect database
Solution
That is because Kanel create a "special" type for the id
The type is
Something like that
So when wanting to find something by Id you has to cast it to the appropiate type
They have it explained in the kanel docs
Thank you very much for fast response. I missed that part in docs.
It's not in kysely docs since we are not the authors of kanel-kysely. It's a third party library