File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
main/javacc/net/sf/jsqlparser/parser
test/java/net/sf/jsqlparser/test/select Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1884,6 +1884,9 @@ Function Function():
18841884 |
18851885 // workaround for replace(string) function (name clash with mysql REPLACE expression)
18861886 <K_REPLACE> { funcName = "REPLACE"; }
1887+ |
1888+ // workaround for truncate(string) function (name clash with mysql TRUNCATE expression)
1889+ <K_TRUNCATE> { funcName = "TRUNCATE"; }
18871890 ) [ "." tmp=RelObjectName() { funcName+= "." + tmp; } ["." tmp=RelObjectName() { funcName+= "." + tmp; }]]
18881891 "(" [ [<K_DISTINCT> { retval.setDistinct(true); } | <K_ALL> { retval.setAllColumns(true); }] (expressionList=SimpleExpressionList() | "*" { retval.setAllColumns(true); }) ] ")"
18891892
Original file line number Diff line number Diff line change @@ -901,6 +901,11 @@ public void testProblemFunction2() throws JSQLParserException {
901901 String stmt = "SELECT sysdate FROM testtable" ;
902902 assertSqlCanBeParsedAndDeparsed (stmt );
903903 }
904+
905+ public void testProblemFunction3 () throws JSQLParserException {
906+ String stmt = "SELECT TRUNCATE(col) FROM testtable" ;
907+ assertSqlCanBeParsedAndDeparsed (stmt );
908+ }
904909
905910 public void testAdditionalLettersGerman () throws JSQLParserException {
906911 String stmt = "SELECT colä, colö, colü FROM testtableäöü" ;
You can’t perform that action at this time.
0 commit comments