Pavel Bekkerman

Results 15 comments of Pavel Bekkerman

Hi @wumpz . I already solved all the conflicts. The PR passes the tests. I saw a couple of commits you did after its submission. If you could merge it...

@wumpz, I didn't get if there's an issue here or not. Because, I'm able to successfully parse: ``` SELECT 'c c\', 'dd', 'ee\' ``` and also this ``` assertSqlCanBeParsedAndDeparsed( "INSERT...

> @wumpz, > > I didn't get if there's an issue here or not. > Because, I'm able to successfully parse: > > ``` > SELECT 'c c\', 'dd', 'ee\'...

@wumpz , Yep, I already figured that. Had to print char-by-char in CharStream to discover single \ is not interpreted correctly. I want to understand: is it correct what @manticore-projects...

> So the question is, is this statement of yours with a quotation correct? For which database? > > ``` > SELECT * FROM T WHERE t1 LIKE 'test\'' ESCAPE...

This is my hack: ``` public void CommonTokenAction(Token t) { String STR = "\'\\\'"; if(t.image.length() > 3 && t.image.startsWith(STR)) { input_stream.backup(t.image.length() - STR.length()); t.image = STR; } t.absoluteBegin = getCurrentTokenAbsolutePosition();...

For example, these now fail: ``` net.sf.jsqlparser.statement.select.SelectTest.testIssue167_singleQuoteEscape() net.sf.jsqlparser.statement.select.SelectTest.testIssue167_singleQuoteEscape2() ``` To complete the solution (and allow the above to parse correctly) I would limit this solution to "parsing state" - in...

A little better version - to NOT fail the above mentioned tests. (Still no "parsing state" used). ``` public void CommonTokenAction(Token t) { String STR = "\'\\\'"; if(t.image.length() > 3...

Tried this: ``` SELECT * FROM sakila.customer WHERE first_name NOT LIKE 'ID\\A' ESCAPE '\' AND last_name = 'ANDREWS' ``` Works on SQL Server.

> @wheredevel That's right, but you are not escaping a single quote. The problem here is to parse `escape '\'`. That's why I introduced point 2. This is a legit...