Skip to content
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

feat(bobgen-sqlite): support jsonb type as json #169

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hmnd
Copy link

@hmnd hmnd commented Jan 29, 2024

fixes #168

@stephenafamo
Copy link
Owner

Thank you.

Kindly add a JSONB column to the sqlite driver test and make sure the type is set correctly in the golden files which would need to be updated by running the test with the flag -overwrite-golden.

Due to SQLite peculiarities, merely sending the JSON bytes to the column would not convert it into the JSONB without calling jsonb().

So maybe not in this PR, but we should find a way for the generated models to always insert/update JSONB columns by wrapping the values in a jsonb function call.
Or, if we can find a way to transform the bytes already, we can use a custom marshaller when sending the arguments (i.e. in struct.Value() method)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JSONB support for SQLite
2 participants