mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improve sqlwall rule
This commit is contained in:
@@ -62,7 +62,7 @@ public class SQLSelectParser extends SQLParser {
|
||||
if (select.getOrderBy() == null) {
|
||||
select.setOrderBy(parseOrderBy());
|
||||
}
|
||||
|
||||
|
||||
if (lexer.token() == Token.HINT) {
|
||||
this.exprParser.parseHints(select.getHints());
|
||||
}
|
||||
@@ -103,6 +103,20 @@ public class SQLSelectParser extends SQLParser {
|
||||
return unionRest(union);
|
||||
}
|
||||
|
||||
if (lexer.token() == Token.EXCEPT) {
|
||||
lexer.nextToken();
|
||||
|
||||
SQLUnionQuery union = new SQLUnionQuery();
|
||||
union.setLeft(selectQuery);
|
||||
|
||||
union.setOperator(SQLUnionOperator.EXCEPT);
|
||||
|
||||
SQLSelectQuery right = this.query();
|
||||
union.setRight(right);
|
||||
|
||||
return union;
|
||||
}
|
||||
|
||||
if (lexer.token() == Token.INTERSECT) {
|
||||
lexer.nextToken();
|
||||
|
||||
@@ -145,7 +159,7 @@ public class SQLSelectParser extends SQLParser {
|
||||
}
|
||||
|
||||
accept(Token.SELECT);
|
||||
|
||||
|
||||
if (lexer.token() == Token.COMMENT) {
|
||||
lexer.nextToken();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user