mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved sql parser.
This commit is contained in:
+9
@@ -22,6 +22,7 @@ import com.alibaba.druid.sql.ast.SQLStatement;
|
||||
import com.alibaba.druid.sql.ast.expr.*;
|
||||
import com.alibaba.druid.sql.ast.statement.*;
|
||||
import com.alibaba.druid.sql.dialect.oracle.visitor.OracleASTVisitorAdapter;
|
||||
import com.alibaba.druid.util.FnvHash;
|
||||
|
||||
/**
|
||||
* Created by wenshao on 26/07/2017.
|
||||
@@ -46,6 +47,14 @@ public class NameResolveVisitor extends OracleASTVisitorAdapter {
|
||||
return false;
|
||||
}
|
||||
|
||||
long hash = x.nameHashCode64();
|
||||
SQLTableSource tableSource = null;
|
||||
|
||||
if (hash == FnvHash.Constants.LEVEL
|
||||
|| hash == FnvHash.Constants.CONNECT_BY_ISCYCLE) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (parent instanceof SQLPropertyExpr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -503,6 +503,10 @@ class SchemaResolveVisitorFactory {
|
||||
}
|
||||
|
||||
public boolean visit(SQLIdentifierExpr x) {
|
||||
if (x.nameHashCode64() == FnvHash.Constants.ROWNUM) {
|
||||
return false;
|
||||
}
|
||||
|
||||
resolve(this, x);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -143,7 +143,6 @@ merge
|
||||
min
|
||||
mod
|
||||
modifies
|
||||
module
|
||||
multiset
|
||||
natural
|
||||
nclob
|
||||
|
||||
Reference in New Issue
Block a user