Support for JSON columns in other databases #25
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request refactors and improves how JSON values are encoded and decoded across different JDBC and R2DBC database controllers. It standardizes the JSON encoding logic, introduces new encoding objects for text-based JSON handling, and adds comprehensive tests for JSON serialization/deserialization with various databases.
Encoding and Decoding Improvements
AdditionalPostgresEncodingandR2dbcPostgresAdditionalEncodingobjects with new, standardizedJsonObjectEncodingandR2dbcJsonObjectEncodingobjects for handling JSON values in Postgres controllers. This makes the encoding logic more consistent and easier to maintain. [1] [2] [3] [4]JsonTextEncodingandR2dbcJsonTextEncodingobjects for handling JSON as text (VARCHAR/String) in non-Postgres databases (H2, MySQL, Oracle, Sqlite, SqlServer) for both JDBC and R2DBC controllers. Each controller now copies its encoding configuration to include these new encoders and decoders. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]Codebase Consistency
open classinstead ofclass, improving extensibility and consistency across the codebase. [1] [2] [3] [4] [5]Testing Enhancements
SqlJsonValueannotation works correctly for both inner data classes and annotated fields, ensuring reliable serialization and deserialization of JSON values. [1] [2] [3] [4]File and Naming Updates
R2dbcPostgresAdditionalEncoding.kttoR2dbcJsonObjectEncoding.ktto better reflect its purpose and contents.Overall, these changes make JSON handling across different database controllers more robust, consistent, and easier to test and extend.