Skip to content

Commit aff5360

Browse files
committed
parser updated oracle recursives
1 parent a7566a7 commit aff5360

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/javacc/net/sf/jsqlparser/parser/JSqlParserCC.jj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ import net.sf.jsqlparser.statement.update.Update;
157157
* The parser generated by JavaCC
158158
*/
159159
public class CCJSqlParser {
160+
private boolean allowOraclePrior = false;
160161
}
161162

162163

@@ -255,6 +256,7 @@ TOKEN: /* SQL Keywords. prefixed with K_ to avoid name clashes */
255256
| <K_REFERENCES:"REFERENCES">
256257
| <K_START:"START">
257258
| <K_CONNECT:"CONNECT">
259+
| <K_PRIOR:"PRIOR">
258260
}
259261

260262

@@ -1084,7 +1086,7 @@ Expression WhereClause():
10841086
Expression OracleHierarchicalQueryClause(): {}
10851087
{
10861088
[ <K_START> <K_WITH> AndExpression() ]
1087-
<K_CONNECT> <K_BY> [ "NOCYCLE" ] AndExpression()
1089+
<K_CONNECT> <K_BY> [ "NOCYCLE" ] { allowOraclePrior=true; } AndExpression() { allowOraclePrior=false; }
10881090

10891091
{ return null; }
10901092
}
@@ -1303,6 +1305,7 @@ Expression RegularCondition():
13031305
}
13041306
{
13051307

1308+
[ <K_PRIOR> ]
13061309
[ <K_NOT> { not = true; } ]
13071310
leftExpression=ComparisonItem() { result = leftExpression; }
13081311

@@ -1319,6 +1322,7 @@ Expression RegularCondition():
13191322
)
13201323
rightExpression=ComparisonItem()
13211324

1325+
[ <K_PRIOR> ]
13221326
[ "(+)" { oracleJoin=EqualsTo.ORACLE_JOIN_LEFT; } ]
13231327

13241328
{

0 commit comments

Comments
 (0)