Skip to content

Commit

Permalink
parser updated oracle recursives
Browse files Browse the repository at this point in the history
  • Loading branch information
wumpz committed Oct 1, 2013
1 parent a7566a7 commit aff5360
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/javacc/net/sf/jsqlparser/parser/JSqlParserCC.jj
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ import net.sf.jsqlparser.statement.update.Update;
* The parser generated by JavaCC
*/
public class CCJSqlParser {
private boolean allowOraclePrior = false;
}


Expand Down Expand Up @@ -255,6 +256,7 @@ TOKEN: /* SQL Keywords. prefixed with K_ to avoid name clashes */
| <K_REFERENCES:"REFERENCES">
| <K_START:"START">
| <K_CONNECT:"CONNECT">
| <K_PRIOR:"PRIOR">
}


Expand Down Expand Up @@ -1084,7 +1086,7 @@ Expression WhereClause():
Expression OracleHierarchicalQueryClause(): {}
{
[ <K_START> <K_WITH> AndExpression() ]
<K_CONNECT> <K_BY> [ "NOCYCLE" ] AndExpression()
<K_CONNECT> <K_BY> [ "NOCYCLE" ] { allowOraclePrior=true; } AndExpression() { allowOraclePrior=false; }

{ return null; }
}
Expand Down Expand Up @@ -1303,6 +1305,7 @@ Expression RegularCondition():
}
{

[ <K_PRIOR> ]
[ <K_NOT> { not = true; } ]
leftExpression=ComparisonItem() { result = leftExpression; }

Expand All @@ -1319,6 +1322,7 @@ Expression RegularCondition():
)
rightExpression=ComparisonItem()

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

{
Expand Down

0 comments on commit aff5360

Please sign in to comment.