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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes 5040 PostgreSql json operators #5041

Merged
merged 10 commits into from
Mar 27, 2024

Conversation

griffio
Copy link
Contributor

@griffio griffio commented Feb 27, 2024

fixes #5040

馃毀 馃崝 based on branch griffio:fix-5028-postgresql-json as requires JSON type

Adds Json Path operator to grammar
Adds jsonExpression to return JSON type in resolver
Adds Integration Tests - json functions
Note: ? '?|' ?&' operators require the Sql statement to use an additional ? see https://jdbc.postgresql.org/documentation/query/#using-the-statement-or-preparedstatement-interface

||, - JSON type used with existing operators

Fix json functions to allow Json type binding with setObjectOther

@griffio griffio changed the title Fix 5040 PostgreSql json operators Fixes 5040 PostgreSql json operators Feb 28, 2024
@griffio griffio marked this pull request as ready for review March 19, 2024 10:32
Add Json Path operator to grammar
Add jsonExpression to return JSON type in resolver
Add Integration Tests
Any operators starting with "?" must be escaped with an prefix "?" for binding with JDBC statements.
This means that SQL statements must use e.g "??"
Either Boolean or JSON
Tests for operators
previous tests were not valid
Fixture tests
Integration tests
@griffio griffio force-pushed the fix-5040-postgresql-json-operators branch from a359863 to d8fd1c2 Compare March 20, 2024 07:48
Use the Json type so that the bind parameters use setObjectOther

Add integration tests
@hfhbd hfhbd merged commit 8297a1e into cashapp:master Mar 27, 2024
10 checks passed
@griffio griffio deleted the fix-5040-postgresql-json-operators branch March 28, 2024 07:04
hfhbd pushed a commit that referenced this pull request Apr 2, 2024
* Initial changes for json operators

Add Json Path operator to grammar
Add jsonExpression to return JSON type in resolver
Add Integration Tests

* Add boolean operators to grammar

Any operators starting with "?" must be escaped with an prefix "?" for binding with JDBC statements.
This means that SQL statements must use e.g "??"

* Discriminate operator return type

Either Boolean or JSON

* Integration tests

Tests for operators

* Fixture Test

* Remove "'||' | '-'" operators for now

JsonExpressionMixin.kt

* Fixture tests

previous tests were not valid

* Support Json for "||" "-" operators

* Add tests for operators

Fixture tests
Integration tests

* fix json functions

Use the Json type so that the bind parameters use setObjectOther

Add integration tests
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.

Improve PostgreSql Json and Jsonb operators
2 participants