Skip to content

Support marshaling / unmarshaling values to JSON #2761

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

Open
kyleconroy opened this issue Sep 22, 2023 · 1 comment
Open

Support marshaling / unmarshaling values to JSON #2761

kyleconroy opened this issue Sep 22, 2023 · 1 comment

Comments

@kyleconroy
Copy link
Collaborator

kyleconroy commented Sep 22, 2023

MySQL, PostgreSQL and SQLite all now have support for JSON values. They also include a large set of JSON functions. sqlc should be able to marshal / unmarshal JSON values into Go types beyond json.RawMessage.

@kyleconroy kyleconroy changed the title Support marshaling values to JSON Support marshaling / unmarshalling values to JSON Oct 2, 2023
@kyleconroy kyleconroy changed the title Support marshaling / unmarshalling values to JSON Support marshaling / unmarshaling values to JSON Oct 2, 2023
@RyPeck
Copy link

RyPeck commented May 20, 2024

@kyleconroy would this include override support on the return value of these functions in the future?

https://play.sqlc.dev/p/36d17603277ae408469c9e07010a038779e226daa6a108ac53cfa1b0655f6bb8

Would be useful to be able to define an override on the alias_name when using JSON functions (->, ->> and the others).

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

No branches or pull requests

2 participants