-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for JSONB data types #3
Comments
Hey sorry I didn't see this until now, are you still having this issue? We're using json columns currently |
From this discord conversation (note: I'm not the one who found this, credits to steebee#5616):
As he pointed out there is this PR: #5 pending to merge. Maybe I could give it a try later or perhaps @thdxr wants to give it more thought |
Currently this fix worked for me |
Yep, also using the fix mentioned here. A similar solution was required for uuid columns. kysely-org/kysely#209 (comment)
Combined with this for deserialising on the way out:
NOTE The ParseJSONResultsPlugin was only introduced in 0.26.0 which resulted in me encountering this issue: Workaround was to downgrade to 0.25.0 and copy/paste the |
Hey, thanks for this library, it's super promising. I've been using it for schema changes so far, but when I attempted to use it for an actual insert query I hit an issue with my JSONB columns. Is there a way to use JSONB at the moment or is it unsupported?
I had a poke around (after receiving awtf
error from here 😅) and if I hacked the serialization forobject
I could make it work, though I'm not sure if it's actually the right way to do it:I also wondered about the typeHint property for the SqlParameter, which can be set toJSON
to indicate thestringValue
contains JSON. I didn't actually do this and it all worked fine anyway, but perhaps the serialize could be updated to return aSqlParameter
with the hint rather than just the value itself.Edit: Ignore the above, it wasn't actually working against a real database, just locally. Ooops.
I'm interested to hear your thoughts on this. I'm happy to send a PR if you can give me some direction.
The text was updated successfully, but these errors were encountered: