Skip to content

Commit 68e5b53

Browse files
committed
introduced boolean values within conditions
1 parent a29c3ac commit 68e5b53

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1581,7 +1581,8 @@ Expression Condition():
15811581
{
15821582
(LOOKAHEAD(SQLCondition()) result=SQLCondition()
15831583
| LOOKAHEAD(RegularCondition()) result=RegularCondition()
1584-
| result=Function()
1584+
| LOOKAHEAD(Function()) result=Function()
1585+
| result=Column()
15851586
)
15861587

15871588
{ return result; }

src/test/java/net/sf/jsqlparser/test/select/SelectTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2111,4 +2111,12 @@ public void testIssue215_possibleEndlessParsing7() throws JSQLParserException {
21112111
public void testIssue230_cascadeKeyword() throws JSQLParserException {
21122112
assertSqlCanBeParsedAndDeparsed("SELECT t.cascade AS cas FROM t");
21132113
}
2114+
2115+
public void testBooleanValue() throws JSQLParserException {
2116+
assertSqlCanBeParsedAndDeparsed("SELECT col FROM t WHERE a");
2117+
}
2118+
2119+
public void testBooleanValue2() throws JSQLParserException {
2120+
assertSqlCanBeParsedAndDeparsed("SELECT col FROM t WHERE 3<5 and a");
2121+
}
21142122
}

0 commit comments

Comments
 (0)