Skip to content

JSqlParser cannot recognize \' #875

Closed
@yanbeipang

Description

@yanbeipang

Describe the bug
Got JSQLParserException when parsing the following SQLs:

To Reproduce
Cannot parse:
insert into standard_table(gmt_create, gmt_modified, config_name, standard_code) values (now(), now(), null, 'if
@fac.sql_type in
[ 'UPDATE','DELETE','INSERT','INSERT_SELECT']
then
@act.allow_submit
end
');

Will work:
insert into standard_table(gmt_create, gmt_modified, config_name, standard_code) values (now(), now(), null, 'if
@fac.sql_type in
[ "UPDATE","DELETE","INSERT","INSERT_SELECT"]
then
@act.allow_submit
end
');

Expected behavior
A clear and concise description of what you expected to happen.

System

  • Database you are using
    MySQL
  • Java Version
    Unimportant
  • JSqlParser version
    2.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions