Explore infrastructure for Dialect-specific Criteria
#2076
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 explores the necessary infrastructure so that a Dialect-specific extension can be provided to render Database-specific operators and functions for usage in
Criteria
(and later on Select Items and Order By).To verify assumptions, we've provided a Postgres-specific dialect extension with:
Criteria Infrastructure requires details about typing and property to column (including joins) mapping to consider quotation, column names and target type conversion.
TODO:
QueryExpress
with its nested interfaces and methodsPgSql
API styleBindMarkers
copy (org.springframework.data.relational.core.binding
package)Syntax Variants
Functional Transformation (left-hand-side)
Functional Transformation (right-hand-side)
Fluent API per Entrypoint
Fluent API (right-hand-side)
Each style contributes some useful details and we have to discuss for the Postgres-specific part, how we want to expose the API. We want to generally avoid a style that would e.g. make use of many braces (e.g.
asBoolean(field(json("some_json"), "country"))
) as counting closing-braces and inner braces is detrimental to code readability.