effect-kysely
effect-kysely copied to clipboard
how to store data in jsonb?
great lib, thanks for sharing it! Would you be kind to provide an example on how to use it with JSONB?
- I have a column typed jsonb in sqlite
- I typed my effect/schema property with Schema.Object
I seem to succeed in serializing the value but idk how to decode it, effect-kysely throws
to serialize the value, I seen on kysely documentation I should cast it like so
sql`CAST(${JSON.stringify(value)} AS JSONB)`