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

JPQL || operator for string concatenation #397

Closed
gavinking opened this issue Apr 18, 2023 · 0 comments · Fixed by #418
Closed

JPQL || operator for string concatenation #397

gavinking opened this issue Apr 18, 2023 · 0 comments · Fixed by #418
Projects

Comments

@gavinking
Copy link
Contributor

JPQL has a concat() function. It would be nice to also allow the SQL-style || operator.

gavinking added a commit to gavinking/jpa-api that referenced this issue May 25, 2023
@lukasj lukasj linked a pull request Jul 11, 2023 that will close this issue
rfelcman added a commit to eclipse-ee4j/eclipselink that referenced this issue Jul 17, 2023
This commit contains following changes:

    New JPQL Grammar 3.2 (version matches upcoming Jakarta Persistence 3.2) and EclipseLink JPQL Grammar 4.1
    New JPQL String expression category with related classes (like arithmetic expression)
    New JPQL String operator || for string concatenation like JPQL CONCAT(....) function
    Tests are available in JPQL parser and JPA JSE test module
    EclipseLink issue is described at 

Implement new JPQLGrammar for upcoming Jakarta Persistence 3.2 #1885 and JPA specification request at the JPQL || operator for string concatenation jakartaee/persistence#397
|| operator is handled at JPQL level, but translated into SQL function CONCAT(...) as not every database supports || or is mentioned as OR logical operator (MySQL).

Signed-off-by: Radek Felcman <radek.felcman@oracle.com>
@lukasj lukasj added this to To do in 3.2.0 via automation Aug 4, 2023
@lukasj lukasj moved this from To do to Done in 3.2.0 Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
3.2.0
Done
Development

Successfully merging a pull request may close this issue.

1 participant