Skip to content

Issue when column name contains escaped enclosing character #64

@fabiencelier

Description

@fabiencelier

The query

SqlFormatter.of(Dialect.PlSql)
		.extend(cfg -> cfg.plusOperators("->"))
		.format("SELECT `My field with \\` back () <<<<<< tick and a verryyyyyyyy long name` FROM MY_TABLE");

produces

SELECT
  `My field with \` back < < < < < < tick
  and a verryyyyyyyy long name ` FROM MY_TABLE

Which is no longer a valid query as the name has been split over multiple lines and whitespaces have been included.
I think that the first ` is detected as the end of the name even though it is escaped with a \.

Is there any way to specify such an escape pattern in column names ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions