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

fix: support parenthesis in {oj ...} JDBC escape syntax #865 #1204

Merged
merged 15 commits into from Jun 4, 2018
Merged
Diff settings

Always

Just for now

this should fix #865 becuase it allows paranthesises after oj.

tests are green and with this crystal reports seems to work too
  • Loading branch information...
AlBundy33 committed May 31, 2018
commit 92806631c845e21c738256ce4103c3d65a2c6c87
@@ -1278,6 +1278,7 @@ private static String escapeFunction(String functionName, String args, boolean s
}

private static final char[] QUOTE_OR_ALPHABETIC_MARKER = {'\"', '0'};
private static final char[] QUOTE_OR_ALPHABETIC_MARKER_OR_PARANTHESIS = {'\"', '0', '('};
private static final char[] SINGLE_QUOTE = {'\''};

// Static variables for parsing SQL when replaceProcessing is true.
@@ -1288,7 +1289,7 @@ private static String escapeFunction(String functionName, String args, boolean s

ESC_TIMESTAMP("ts", SINGLE_QUOTE, "TIMESTAMP "),
ESC_FUNCTION("fn", QUOTE_OR_ALPHABETIC_MARKER, null),
ESC_OUTERJOIN("oj", QUOTE_OR_ALPHABETIC_MARKER, null),
ESC_OUTERJOIN("oj", QUOTE_OR_ALPHABETIC_MARKER_OR_PARANTHESIS, null),
ESC_ESCAPECHAR("escape", SINGLE_QUOTE, "ESCAPE ");

private final char[] escapeKeyword;
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.