-
Notifications
You must be signed in to change notification settings - Fork 138
feat: support JSON types, expression language #1146
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
Conversation
I appreciate your interest in our project and am grateful for you effort to put together this PR. I see that it attempts to build upon the work that was found in PR #1130. I also see that we have then attempted to add a number of other elements above and beyond that. We are currently at 350+ lines of new code. I have not had a chance to dive deeply into this code, so my apologies. I have several questions (some of these are more rhetorical so don't feel as though you need to respond to each of them ... this is mostly me thinking out loud).
If we were to break this into small units of change:
What are your thoughts? |
Yep, happy to break this up (more of a conversation-starter vs expecting to get all of this in :)) - I think the right sequencing is something like:
This will unblock users who want to reference a JSON column in table definitions / query results w/o indexing
This will allow users to generate queries that reach into the JSON column to pull out subfields + generate appropriate derived types for those expressions ^ For my own use case, these two are satisfactory
Optional because this is probably a niche use case / requires workarounds for missing dbapi support - instead, we could just disallow this. This will allow users to pass a JSON object as a query parameter, with appropriate type conversions when generating SQL
Optional because this is a preview feature - OK to wait until this is GA / requested by user This will allow users to use lax / lax recursive modes in generated JSON path expressions |
Closing in favor of #1147 - I pulled out a smaller PR from the rough sequencing above |
This builds on the work in #1130
json_serializer
/json_deserializer
dialect argsPARSE_JSON
around JSON-as-STRING bind expressionsTODO:
References:
For context, I work on a system that exclusively uses the SQL expression language, so I may have some blind spots around support on the ORM side - let me know if anything is missing there.
Fixes #399 🦕