File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed
jjtree/net/sf/jsqlparser/parser Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ public class Join {
39
39
private boolean inner = false ;
40
40
private boolean simple = false ;
41
41
private boolean cross = false ;
42
+ private boolean semi = false ;
42
43
private FromItem rightItem ;
43
44
private Expression onExpression ;
44
45
private List <Column > usingColumns ;
@@ -82,6 +83,15 @@ public void setOuter(boolean b) {
82
83
outer = b ;
83
84
}
84
85
86
+ /**
87
+ * Whether is a "SEMI" join
88
+ *
89
+ * @return true if is a "SEMI" join
90
+ */
91
+ public boolean isSemi () { return semi ; }
92
+
93
+ public void setSemi (boolean b ) { semi = b ; }
94
+
85
95
/**
86
96
* Whether is a "LEFT" join
87
97
*
@@ -199,6 +209,8 @@ public String toString() {
199
209
type += "OUTER " ;
200
210
} else if (isInner ()) {
201
211
type += "INNER " ;
212
+ } else if (isSemi ()) {
213
+ type += "SEMI " ;
202
214
}
203
215
204
216
return type + "JOIN " + rightItem + ((onExpression != null ) ? " ON " + onExpression + "" : "" )
Original file line number Diff line number Diff line change @@ -338,6 +338,8 @@ public void deparseJoin(Join join) {
338
338
buffer .append (" OUTER" );
339
339
} else if (join .isInner ()) {
340
340
buffer .append (" INNER" );
341
+ } else if (join .isSemi ()) {
342
+ buffer .append (" SEMI" );
341
343
}
342
344
343
345
buffer .append (" JOIN " );
Original file line number Diff line number Diff line change @@ -232,6 +232,7 @@ TOKEN: /* SQL Keywords. prefixed with K_ to avoid name clashes */
232
232
| <K_DELAYED : "DELAYED">
233
233
| <K_HIGH_PRIORITY : "HIGH_PRIORITY">
234
234
| <K_IGNORE : "IGNORE">
235
+ | <K_SEMI : "SEMI">
235
236
}
236
237
237
238
TOKEN : /* Operators */
@@ -1224,9 +1225,9 @@ Join JoinerExpression():
1224
1225
List<Column> columns = null;
1225
1226
}
1226
1227
{
1227
- [
1228
- ( <K_LEFT > { join.setLeft (true); }
1229
- | <K_RIGHT> { join.setRight(true); }
1228
+ [
1229
+ <K_LEFT> { join.setLeft(true); } [ <K_SEMI> { join.setSemi(true); } | <K_OUTER > { join.setOuter (true); } ]
1230
+ | ( <K_RIGHT> { join.setRight(true); }
1230
1231
| <K_FULL> { join.setFull(true); }
1231
1232
) [ <K_OUTER> { join.setOuter(true); } ]
1232
1233
| <K_INNER> { join.setInner(true); }
You can’t perform that action at this time.
0 commit comments