How to insert JSONB types in postgres?
I've looked at https://kysely-org.github.io/kysely/classes/InsertQueryBuilder.html#values and it's not very clear how I'd apply JSON to that column type when inserting. Do I need to create some sort of special helper like in: https://github.com/kysely-org/kysely/blob/master/site/docs/recipes/extending-kysely.md
Also for the interface, do we define the field as a
Record
type? What if the field is optional?GitHub
kysely/extending-kysely.md at master · kysely-org/kysely
A type-safe typescript SQL query builder. Contribute to kysely-org/kysely development by creating an account on GitHub.
InsertQueryBuilder | kysely
Documentation for kysely
8 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Oh nice, so just feed in a normal object to the field then
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
For fetching did you have to implement the
extending-kysely.md
items?Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Thanks
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View