File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed
main/jjtree/net/sf/jsqlparser/parser
test/java/net/sf/jsqlparser/statement/select Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ Also I would like to know about needed examples or documentation stuff.
6565
6666## Extensions in the latest SNAPSHOT version 3.1
6767
68+ * allow more complex expressions for ** CASE** .
6869* allowed ** start** as object name as column name or table name
6970* introduced more positions for ** !** instead of ** NOT**
7071* allowed more complex expressions within ** if** function
Original file line number Diff line number Diff line change @@ -3234,7 +3234,7 @@ Expression CaseWhenExpression() #CaseWhenExpression:
32343234 (
32353235 ( clause=WhenThenSearchCondition() { whenClauses.add(clause); } )+
32363236 |
3237- (LOOKAHEAD(RegularCondition()) switchExp=RegularCondition() | switchExp=BitwiseAndOr() )
3237+ switchExp=Condition( )
32383238 ( clause=WhenThenValue() { whenClauses.add(clause); } )+
32393239 )
32403240 [<K_ELSE> elseExp=Condition()]
Original file line number Diff line number Diff line change @@ -1297,6 +1297,11 @@ public void testIssue235SimplifiedCase3() throws JSQLParserException {
12971297 public void testIssue235SimplifiedCase4 () throws JSQLParserException {
12981298 assertSqlCanBeParsedAndDeparsed ("SELECT CASE WHEN (CASE WHEN (CASE WHEN (CASE WHEN (1) THEN 0 END) THEN 0 END) THEN 0 END) THEN 0 END FROM a" );
12991299 }
1300+
1301+ @ Test
1302+ public void testIssue862CaseWhenConcat () throws JSQLParserException {
1303+ assertSqlCanBeParsedAndDeparsed ("SELECT c1, CASE c1 || c2 WHEN '091' THEN '2' ELSE '1' END AS c11 FROM T2" );
1304+ }
13001305
13011306 @ Test
13021307 public void testReplaceAsFunction () throws JSQLParserException {
You can’t perform that action at this time.
0 commit comments