Skip to content

Allow whitespace in JPQL and EQL JDBC escape literals.#4294

Open
jewoodev wants to merge 1 commit into
spring-projects:mainfrom
jewoodev:jdbc-escape-whitespace
Open

Allow whitespace in JPQL and EQL JDBC escape literals.#4294
jewoodev wants to merge 1 commit into
spring-projects:mainfrom
jewoodev:jdbc-escape-whitespace

Conversation

@jewoodev

@jewoodev jewoodev commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

JPQL and EQL currently tokenize JDBC date, time, and timestamp escape literals only when the marker is directly followed by the quoted literal. That rejects common JDBC-style forms such as {d '2012-01-03'} during lexing.

This change allows optional whitespace after the JDBC escape marker in the JPQL and EQL lexer rules and adds renderer coverage for date, time, and timestamp literals. Existing no-whitespace forms remain covered by the shared renderer TCK.

  • You have read the Spring Data contribution guidelines.
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.
  • You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

JPQL and EQL lex JDBC date, time, and timestamp escape literals as single tokens. This required the marker to be directly followed by the quoted literal and rejected forms such as `{d '2012-01-03'}`.

Allow optional whitespace after the marker while preserving the existing no-whitespace forms, and add renderer coverage for JPQL and EQL.

Signed-off-by: jewoodev <jewoos15@naver.com>
@jewoodev jewoodev changed the title Allow whitespace in JPQL and EQL JDBC escape literals Allow whitespace in JPQL and EQL JDBC escape literals. Jul 4, 2026
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants