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

Rewrite LIKE clauses with wildcards as CONCAT functions. #2940

Closed
wants to merge 8 commits into from

Conversation

gregturn
Copy link
Contributor

@gregturn gregturn commented May 5, 2023

No description provided.

@gregturn gregturn requested a review from schauder May 5, 2023 16:28
@gregturn gregturn linked an issue May 5, 2023 that may be closed by this pull request
Include additional tests verifying this behavior.

Resolves #2939.
Related: #2760.
@gregturn gregturn changed the title Enhance ref docs to show how to use same parameter multiple times Rewrite LIKE clauses with wildcards as CONCAT functions. May 9, 2023
@gregturn gregturn closed this May 9, 2023
@gregturn
Copy link
Contributor Author

gregturn commented May 9, 2023

Superceded by #2944

gregturn added a commit that referenced this pull request May 9, 2023
We support wrapping parameters (named or positional) with optional wildcards when doing LIKE patterns. This is out-of-band and requires moving the wildcards into the bindings. To stop doing this and causing race conditions, we can instead rewrite the queries using the CONCAT function. This function is standard across relational database (native queries) as well as JPA providers (Hibernate and EclipseLink).

Resolves #2939.
Related: #2760.
Original Pull Request: #2940.
Superceding Pull Request: #2944
@gregturn gregturn deleted the issue/gh-2939 branch May 9, 2023 20:53
@gregturn gregturn linked an issue May 9, 2023 that may be closed by this pull request
gregturn added a commit that referenced this pull request May 10, 2023
We support wrapping parameters (named or positional) with optional wildcards when doing LIKE patterns. This is out-of-band and requires moving the wildcards into the bindings. To stop doing this and causing race conditions, we can instead rewrite the queries using the CONCAT function. This function is standard across relational database (native queries) as well as JPA providers (Hibernate and EclipseLink).

See #2939
See #2760
Original Pull Request: #2940
Superceding Pull Request: #2944
gregturn added a commit that referenced this pull request May 15, 2023
We support wrapping parameters (named or positional) with optional wildcards when doing LIKE patterns. This is out-of-band and requires moving the wildcards into the bindings. To stop doing this and causing race conditions, we can instead rewrite the queries using the CONCAT function. This function is standard across relational database (native queries) as well as JPA providers (Hibernate and EclipseLink).

See #2939
See #2760
Original Pull Request: #2940
Superceding Pull Request: #2944
gregturn added a commit that referenced this pull request May 15, 2023
We support wrapping parameters (named or positional) with optional wildcards when doing LIKE patterns. This is out-of-band and requires moving the wildcards into the bindings. To stop doing this and causing race conditions, we can instead rewrite the queries using the CONCAT function. This function is standard across relational database (native queries) as well as JPA providers (Hibernate and EclipseLink).

See #2939
See #2760
Original Pull Request: #2940
Superceding Pull Request: #2944
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.

1 participant