How do I compare to a value in a jsonb column?
I have this method:
I'm pretty much trying to do the opposite. Where the "total" value isn't "0.00".
my table just has 3 columns "id", "game_id", and "data"

4 Replies
this works and it's based on what I read from hovering over
ref()
and reading the documentation:
The only problem is that I have to use //@ts-ignore
to bypass that error 😅 , which makes me assume I'm doing it wrong
You just need to use a correct type for that data column. I'm guessing you just have
object
or something similar now? It needs to have the result
property that needs to have the game
property and so on.oh okay, I just ran the codegen I didnt create the type myself for that column but i'll do that now 🙏
oh, my problem was that
kysely-codegen
doesn't support json columns yet, but i used the codegen and modified those manually now it works . thanks for the point in the right direction!