Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parser does not properly recognize some multiline string literals #543

Closed
bjhartin opened this issue Jul 2, 2013 · 1 comment
Closed

Parser does not properly recognize some multiline string literals #543

bjhartin opened this issue Jul 2, 2013 · 1 comment
Labels

Comments

@bjhartin
Copy link

@bjhartin bjhartin commented Jul 2, 2013

Axel,

We are encountering SQL parsing errors when single quotes are adjacent to characters not explicitly specified as token delimiters in SqlStatementBuilder.endsWithOpenMultilineStringLiteral.

To reproduce, add these assertions to a test:

assertFalse(new SQLServerSqlStatementBuilder().endsWithOpenMultilineStringLiteral("print 'baz'+"));
assertFalse(new SQLServerSqlStatementBuilder().endsWithOpenMultilineStringLiteral("print 'baz'-- Oops"));

I think your approach of splitting on SQL special characters may be the issue. I think there are many other special characters (see http://savage.net.au/SQL/sql-2003-2.bnf.html) and also multiple-character sequences ('--') which may need to be included.

Please see related issue #544, in which I suggest two options to reduce or eliminate these parsing errors.

Thanks,

Brian

@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented Apr 15, 2014

Hi Brian,

sorry for the late reply. I fixed the first case.

The second one is the same as #63

Cheers
Axel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.