File tree Expand file tree Collapse file tree 2 files changed +7
-18
lines changed
main/javacc/net/sf/jsqlparser/parser
test/java/net/sf/jsqlparser/test/select Expand file tree Collapse file tree 2 files changed +7
-18
lines changed Original file line number Diff line number Diff line change @@ -193,8 +193,6 @@ TOKEN: /* SQL Keywords. prefixed with K_ to avoid name clashes */
193193| <K_INTO:"INTO">
194194| <K_NULL:"NULL">
195195| <K_LIKE:"LIKE">
196- | <K_REGEXP:"REGEXP">
197- | <K_REGEXP_LIKE:"REGEXP_LIKE">
198196| <K_DROP:"DROP">
199197| <K_JOIN:"JOIN">
200198| <K_LEFT:"LEFT">
@@ -1285,27 +1283,13 @@ Expression Condition():
12851283}
12861284{
12871285 (LOOKAHEAD(SQLCondition()) result=SQLCondition()
1288- | result=FunctionCondition ()
1289- | result=RegularCondition ()
1286+ | LOOKAHEAD(RegularCondition()) result=RegularCondition ()
1287+ | result=Function ()
12901288 )
12911289
12921290 { return result; }
12931291}
12941292
1295- Expression FunctionCondition():
1296- {
1297- Function result;
1298- ExpressionList parameters;
1299- }
1300- {
1301- <K_REGEXP_LIKE> { result = new Function(); result.setName("REGEXP_LIKE"); }
1302- "("
1303- parameters=SimpleExpressionList() { result.setParameters(parameters); }
1304- ")"
1305-
1306- { return result; }
1307- }
1308-
13091293Expression RegularCondition():
13101294{
13111295 Expression result = null;
Original file line number Diff line number Diff line change @@ -1051,5 +1051,10 @@ public void testRegexpLike2() throws JSQLParserException {
10511051 String stmt = "SELECT CASE WHEN REGEXP_LIKE(first_name, '^Ste(v|ph)en$') THEN 1 ELSE 2 END FROM mytable" ;
10521052 assertSqlCanBeParsedAndDeparsed (stmt );
10531053 }
1054+
1055+ public void testBooleanFunction1 () throws JSQLParserException {
1056+ String stmt = "SELECT * FROM mytable WHERE test_func(col1)" ;
1057+ assertSqlCanBeParsedAndDeparsed (stmt );
1058+ }
10541059
10551060}
You can’t perform that action at this time.
0 commit comments