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

Fixes 5028 PostgreSql json #5030

Merged
merged 3 commits into from
Mar 19, 2024
Merged

Conversation

griffio
Copy link
Contributor

@griffio griffio commented Feb 20, 2024

fixes #5028

🚧 🍔 👷

With JDBC, setObject...Types.OTHER can be used to bind a String to a JSON type
Add new binding method* in JdbcDriver

Keep the jsonDataType as a String for reading and writing

Add JSON type for setObject...Types.OTHER binding to write as a String. Read a result String as normal

Add Docker Integration tests (none were being run for json with PostgresDialect)

*This may come in useful for other types like TSVector

@griffio griffio marked this pull request as ready for review February 20, 2024 19:51
@griffio griffio changed the title Fix 5028 postgresql json Fixes 5028 postgresql json Feb 21, 2024
@griffio griffio changed the title Fixes 5028 postgresql json Fixes 5028 PostgreSql json Feb 21, 2024
With JDBC, setObject...Types.OTHER can be used to bind a String to a JSON type

Keep the jsonDataType as a String for reading and writing

This is also useful for other types like TSVector
JSON type needs special object binding
to write as a String.
Read as a String as normal
Previously there were no jsonQueries integration tests even though source existed
@hfhbd hfhbd merged commit be82f84 into cashapp:master Mar 19, 2024
11 checks passed
@griffio griffio deleted the fix-5028-postgresql-json branch March 20, 2024 07:38
hfhbd pushed a commit that referenced this pull request Apr 2, 2024
* Add new method bindObjectOther

With JDBC, setObject...Types.OTHER can be used to bind a String to a JSON type

Keep the jsonDataType as a String for reading and writing

This is also useful for other types like TSVector

* Add JSON enum type

JSON type needs special object binding
to write as a String.
Read as a String as normal

* Add JsonQueries integration tests

Previously there were no jsonQueries integration tests even though source existed
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.

Postgres JSON and JSONB types not supported
2 participants