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.
65
65
66
66
## Extensions in the latest SNAPSHOT version 3.1
67
67
68
+ * allow more complex expressions for ** CASE** .
68
69
* allowed ** start** as object name as column name or table name
69
70
* introduced more positions for ** !** instead of ** NOT**
70
71
* allowed more complex expressions within ** if** function
Original file line number Diff line number Diff line change @@ -3234,7 +3234,7 @@ Expression CaseWhenExpression() #CaseWhenExpression:
3234
3234
(
3235
3235
( clause=WhenThenSearchCondition() { whenClauses.add(clause); } )+
3236
3236
|
3237
- (LOOKAHEAD(RegularCondition()) switchExp=RegularCondition() | switchExp=BitwiseAndOr() )
3237
+ switchExp=Condition( )
3238
3238
( clause=WhenThenValue() { whenClauses.add(clause); } )+
3239
3239
)
3240
3240
[<K_ELSE> elseExp=Condition()]
Original file line number Diff line number Diff line change @@ -1297,6 +1297,11 @@ public void testIssue235SimplifiedCase3() throws JSQLParserException {
1297
1297
public void testIssue235SimplifiedCase4 () throws JSQLParserException {
1298
1298
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" );
1299
1299
}
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
+ }
1300
1305
1301
1306
@ Test
1302
1307
public void testReplaceAsFunction () throws JSQLParserException {
You can’t perform that action at this time.
0 commit comments