sqlc icon indicating copy to clipboard operation
sqlc copied to clipboard

Support marshaling / unmarshaling values to JSON

Open kyleconroy opened this issue 2 years ago • 1 comments

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 avatar Sep 22 '23 17:09 kyleconroy

@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).

RyPeck avatar May 20 '24 15:05 RyPeck