How to do a WHERE clause for a JSON field in kysely
Basically the title. I'm trying to convert the following prisma query to kysely and can't figure out how to do the individual statements inside the where:
data is a Jsonb column. Anybody know how to do this?
Solution:Jump to solution
Hey 👋
A built-in type-safe support for json traversal might be introduced in a future release. There's a PR I'm experimenting in. Postgres as always is different 😐 .
For now:...
2 Replies
Solution
Hey 👋
A built-in type-safe support for json traversal might be introduced in a future release. There's a PR I'm experimenting in. Postgres as always is different 😐 .
For now:
1. postgres:
https://kyse.link/?p=s&i=cI4gE4YRB4IWc6L90ulX
2. mysql/sqlite:
https://kyse.link/?p=s&i=WoFXXNwErh94g2ehOScu
Awesome. Thanks