Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-13218

Support single quotes nested in double quotes in SQL scripts

    XMLWordPrintable

    Details

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sbrannen Sam Brannen
              Reporter:
              ndeb Nicolas Debeissat
              Last updater:
              Spring Issues
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 1 week, 1 day ago