Skip to content

Support single quotes nested in double quotes in SQL scripts [SPR-13218] #17809

Description

@spring-projects-issues

Nicolas Debeissat opened SPR-13218 and commented

Status Quo

Some databases (e.g., Oracle) permit double quoted column aliases that include case-sensitive characters, single quotes, and other special special characters.

For example, in the following SQL statement that is used to populate an embedded database from scripts with Spring, the single quote should not be interpreted as a literal.

select address as "programmer's address" from programmer

Analysis

Spring's ScriptUtils currently interprets a single quote nested in double quotes as the start of a string literal, causing the parsing of the SQL statement to fail.

Deliverables

  1. Ensure that single quotes nested in double quotes do not result in a parsing error.

Affects: 4.0.3

Reference URL: #835

Issue Links:

Referenced from: commits 629bcb6

Metadata

Metadata

Assignees

Labels

in: dataIssues in data modules (jdbc, orm, oxm, tx)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions