mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
Merge pull request #1094 from wenshao/master
sql parser support mysql 5.7 & oceanbase 1.0
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright 1999-2101 Alibaba Group Holding Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.alibaba.druid.sql.ast.statement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.SQLObjectImpl;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLAlterTableAnalyzePartition extends SQLObjectImpl implements SQLAlterTableItem {
|
||||
|
||||
private final List<SQLName> partitions = new ArrayList<SQLName>(4);
|
||||
|
||||
public List<SQLName> getPartitions() {
|
||||
return partitions;
|
||||
}
|
||||
|
||||
public void addPartition(SQLName partition) {
|
||||
if (partition != null) {
|
||||
partition.setParent(this);
|
||||
}
|
||||
this.partitions.add(partition);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void accept0(SQLASTVisitor visitor) {
|
||||
if (visitor.visit(this)) {
|
||||
acceptChild(visitor, partitions);
|
||||
}
|
||||
visitor.endVisit(this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright 1999-2101 Alibaba Group Holding Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.alibaba.druid.sql.ast.statement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.SQLObjectImpl;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLAlterTableCheckPartition extends SQLObjectImpl implements SQLAlterTableItem {
|
||||
|
||||
private final List<SQLName> partitions = new ArrayList<SQLName>(4);
|
||||
|
||||
public List<SQLName> getPartitions() {
|
||||
return partitions;
|
||||
}
|
||||
|
||||
public void addPartition(SQLName partition) {
|
||||
if (partition != null) {
|
||||
partition.setParent(this);
|
||||
}
|
||||
this.partitions.add(partition);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void accept0(SQLASTVisitor visitor) {
|
||||
if (visitor.visit(this)) {
|
||||
acceptChild(visitor, partitions);
|
||||
}
|
||||
visitor.endVisit(this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright 1999-2101 Alibaba Group Holding Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.alibaba.druid.sql.ast.statement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.SQLObjectImpl;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLAlterTableDiscardPartition extends SQLObjectImpl implements SQLAlterTableItem {
|
||||
|
||||
private final List<SQLName> partitions = new ArrayList<SQLName>(4);
|
||||
|
||||
public List<SQLName> getPartitions() {
|
||||
return partitions;
|
||||
}
|
||||
|
||||
public void addPartition(SQLName partition) {
|
||||
if (partition != null) {
|
||||
partition.setParent(this);
|
||||
}
|
||||
this.partitions.add(partition);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void accept0(SQLASTVisitor visitor) {
|
||||
if (visitor.visit(this)) {
|
||||
acceptChild(visitor, partitions);
|
||||
}
|
||||
visitor.endVisit(this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright 1999-2101 Alibaba Group Holding Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.alibaba.druid.sql.ast.statement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.SQLObjectImpl;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLAlterTableImportPartition extends SQLObjectImpl implements SQLAlterTableItem {
|
||||
|
||||
private final List<SQLName> partitions = new ArrayList<SQLName>(4);
|
||||
|
||||
public List<SQLName> getPartitions() {
|
||||
return partitions;
|
||||
}
|
||||
|
||||
public void addPartition(SQLName partition) {
|
||||
if (partition != null) {
|
||||
partition.setParent(this);
|
||||
}
|
||||
this.partitions.add(partition);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void accept0(SQLASTVisitor visitor) {
|
||||
if (visitor.visit(this)) {
|
||||
acceptChild(visitor, partitions);
|
||||
}
|
||||
visitor.endVisit(this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright 1999-2101 Alibaba Group Holding Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.alibaba.druid.sql.ast.statement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.SQLObjectImpl;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLAlterTableOptimizePartition extends SQLObjectImpl implements SQLAlterTableItem {
|
||||
|
||||
private final List<SQLName> partitions = new ArrayList<SQLName>(4);
|
||||
|
||||
public List<SQLName> getPartitions() {
|
||||
return partitions;
|
||||
}
|
||||
|
||||
public void addPartition(SQLName partition) {
|
||||
if (partition != null) {
|
||||
partition.setParent(this);
|
||||
}
|
||||
this.partitions.add(partition);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void accept0(SQLASTVisitor visitor) {
|
||||
if (visitor.visit(this)) {
|
||||
acceptChild(visitor, partitions);
|
||||
}
|
||||
visitor.endVisit(this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright 1999-2101 Alibaba Group Holding Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.alibaba.druid.sql.ast.statement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.SQLObjectImpl;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLAlterTableRebuildPartition extends SQLObjectImpl implements SQLAlterTableItem {
|
||||
|
||||
private final List<SQLName> partitions = new ArrayList<SQLName>(4);
|
||||
|
||||
public List<SQLName> getPartitions() {
|
||||
return partitions;
|
||||
}
|
||||
|
||||
public void addPartition(SQLName partition) {
|
||||
if (partition != null) {
|
||||
partition.setParent(this);
|
||||
}
|
||||
this.partitions.add(partition);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void accept0(SQLASTVisitor visitor) {
|
||||
if (visitor.visit(this)) {
|
||||
acceptChild(visitor, partitions);
|
||||
}
|
||||
visitor.endVisit(this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright 1999-2101 Alibaba Group Holding Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.alibaba.druid.sql.ast.statement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.SQLObjectImpl;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLAlterTableRepairPartition extends SQLObjectImpl implements SQLAlterTableItem {
|
||||
|
||||
private final List<SQLName> partitions = new ArrayList<SQLName>(4);
|
||||
|
||||
public List<SQLName> getPartitions() {
|
||||
return partitions;
|
||||
}
|
||||
|
||||
public void addPartition(SQLName partition) {
|
||||
if (partition != null) {
|
||||
partition.setParent(this);
|
||||
}
|
||||
this.partitions.add(partition);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void accept0(SQLASTVisitor visitor) {
|
||||
if (visitor.visit(this)) {
|
||||
acceptChild(visitor, partitions);
|
||||
}
|
||||
visitor.endVisit(this);
|
||||
}
|
||||
}
|
||||
@@ -33,6 +33,9 @@ public class SQLAlterTableStatement extends SQLStatementImpl implements SQLDDLSt
|
||||
private boolean updateGlobalIndexes = false;
|
||||
private boolean invalidateGlobalIndexes = false;
|
||||
|
||||
private boolean removePatiting = false;
|
||||
private boolean upgradePatiting = false;
|
||||
|
||||
public SQLAlterTableStatement(){
|
||||
|
||||
}
|
||||
@@ -49,6 +52,22 @@ public class SQLAlterTableStatement extends SQLStatementImpl implements SQLDDLSt
|
||||
this.ignore = ignore;
|
||||
}
|
||||
|
||||
public boolean isRemovePatiting() {
|
||||
return removePatiting;
|
||||
}
|
||||
|
||||
public void setRemovePatiting(boolean removePatiting) {
|
||||
this.removePatiting = removePatiting;
|
||||
}
|
||||
|
||||
public boolean isUpgradePatiting() {
|
||||
return upgradePatiting;
|
||||
}
|
||||
|
||||
public void setUpgradePatiting(boolean upgradePatiting) {
|
||||
this.upgradePatiting = upgradePatiting;
|
||||
}
|
||||
|
||||
public boolean isUpdateGlobalIndexes() {
|
||||
return updateGlobalIndexes;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright 1999-2101 Alibaba Group Holding Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.alibaba.druid.sql.ast.statement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.SQLObjectImpl;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLAlterTableTruncatePartition extends SQLObjectImpl implements SQLAlterTableItem {
|
||||
|
||||
private final List<SQLName> partitions = new ArrayList<SQLName>(4);
|
||||
|
||||
public List<SQLName> getPartitions() {
|
||||
return partitions;
|
||||
}
|
||||
|
||||
public void addPartition(SQLName partition) {
|
||||
if (partition != null) {
|
||||
partition.setParent(this);
|
||||
}
|
||||
this.partitions.add(partition);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void accept0(SQLASTVisitor visitor) {
|
||||
if (visitor.visit(this)) {
|
||||
acceptChild(visitor, partitions);
|
||||
}
|
||||
visitor.endVisit(this);
|
||||
}
|
||||
}
|
||||
+135
-18
@@ -31,6 +31,7 @@ import com.alibaba.druid.sql.ast.SQLStatement;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLBinaryOperator;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLCharExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLIntegerExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLLiteralExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLNCharExpr;
|
||||
@@ -41,10 +42,13 @@ import com.alibaba.druid.sql.ast.statement.SQLAlterTableAddColumn;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableAddConstraint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableAddIndex;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableAddPartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableAnalyzePartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableCheckPartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableCoalescePartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableConvertCharSet;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDisableConstraint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDisableKeys;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDiscardPartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropColumnItem;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropConstraint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropForeignKey;
|
||||
@@ -54,8 +58,13 @@ import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropPartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropPrimaryKey;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableEnableConstraint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableEnableKeys;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableImportPartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableOptimizePartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableReOrganizePartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableRebuildPartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableRepairPartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableTruncatePartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLBlockStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLColumnDefinition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateDatabaseStatement;
|
||||
@@ -2309,6 +2318,18 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
for (;;) {
|
||||
if (lexer.token() == Token.DROP) {
|
||||
parseAlterDrop(stmt);
|
||||
} else if (lexer.token() == Token.TRUNCATE) {
|
||||
lexer.nextToken();
|
||||
accept(Token.PARTITION);
|
||||
|
||||
SQLAlterTableTruncatePartition item = new SQLAlterTableTruncatePartition();
|
||||
if (lexer.token() == Token.ALL) {
|
||||
item.getPartitions().add(new SQLIdentifierExpr("ALL"));
|
||||
lexer.nextToken();
|
||||
} else {
|
||||
this.exprParser.names(item.getPartitions(), item);
|
||||
}
|
||||
stmt.addItem(item);
|
||||
} else if (identifierEquals("ADD")) {
|
||||
lexer.nextToken();
|
||||
|
||||
@@ -2359,14 +2380,14 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
}
|
||||
} else if (lexer.token() == Token.PARTITION) {
|
||||
lexer.nextToken();
|
||||
|
||||
|
||||
SQLAlterTableAddPartition item = new SQLAlterTableAddPartition();
|
||||
|
||||
|
||||
if (identifierEquals("PARTITIONS")) {
|
||||
lexer.nextToken();
|
||||
item.setPartitionCount(this.exprParser.integerExpr());
|
||||
}
|
||||
|
||||
|
||||
if (lexer.token() == Token.LPAREN) {
|
||||
lexer.nextToken();
|
||||
SQLPartition partition = this.getExprParser().parsePartition();
|
||||
@@ -2374,7 +2395,6 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
item.addPartition(partition);
|
||||
}
|
||||
|
||||
|
||||
stmt.addItem(item);
|
||||
} else if (identifierEquals(FULLTEXT)) {
|
||||
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
|
||||
@@ -2503,18 +2523,74 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
|
||||
} else if (identifierEquals("DISCARD")) {
|
||||
lexer.nextToken();
|
||||
accept(Token.TABLESPACE);
|
||||
MySqlAlterTableDiscardTablespace item = new MySqlAlterTableDiscardTablespace();
|
||||
|
||||
if (lexer.token() == Token.PARTITION) {
|
||||
lexer.nextToken();
|
||||
SQLAlterTableDiscardPartition item = new SQLAlterTableDiscardPartition();
|
||||
|
||||
if (lexer.token() == Token.ALL) {
|
||||
lexer.nextToken();
|
||||
item.getPartitions().add(new SQLIdentifierExpr("ALL"));
|
||||
} else {
|
||||
this.exprParser.names(item.getPartitions(), item);
|
||||
}
|
||||
|
||||
stmt.addItem(item);
|
||||
} else {
|
||||
accept(Token.TABLESPACE);
|
||||
MySqlAlterTableDiscardTablespace item = new MySqlAlterTableDiscardTablespace();
|
||||
stmt.addItem(item);
|
||||
}
|
||||
} else if (lexer.token() == Token.CHECK) {
|
||||
lexer.nextToken();
|
||||
accept(Token.PARTITION);
|
||||
|
||||
SQLAlterTableCheckPartition item = new SQLAlterTableCheckPartition();
|
||||
|
||||
if (lexer.token() == Token.ALL) {
|
||||
lexer.nextToken();
|
||||
item.getPartitions().add(new SQLIdentifierExpr("ALL"));
|
||||
} else {
|
||||
this.exprParser.names(item.getPartitions(), item);
|
||||
}
|
||||
|
||||
stmt.addItem(item);
|
||||
|
||||
} else if (identifierEquals("IMPORT")) {
|
||||
lexer.nextToken();
|
||||
accept(Token.TABLESPACE);
|
||||
MySqlAlterTableImportTablespace item = new MySqlAlterTableImportTablespace();
|
||||
|
||||
if (lexer.token() == Token.PARTITION) {
|
||||
lexer.nextToken();
|
||||
SQLAlterTableImportPartition item = new SQLAlterTableImportPartition();
|
||||
|
||||
if (lexer.token() == Token.ALL) {
|
||||
lexer.nextToken();
|
||||
item.getPartitions().add(new SQLIdentifierExpr("ALL"));
|
||||
} else {
|
||||
this.exprParser.names(item.getPartitions(), item);
|
||||
}
|
||||
|
||||
stmt.addItem(item);
|
||||
} else {
|
||||
accept(Token.TABLESPACE);
|
||||
MySqlAlterTableImportTablespace item = new MySqlAlterTableImportTablespace();
|
||||
stmt.addItem(item);
|
||||
}
|
||||
} else if (lexer.token() == Token.ANALYZE) {
|
||||
lexer.nextToken();
|
||||
accept(Token.PARTITION);
|
||||
|
||||
SQLAlterTableAnalyzePartition item = new SQLAlterTableAnalyzePartition();
|
||||
|
||||
if (lexer.token() == Token.ALL) {
|
||||
lexer.nextToken();
|
||||
item.getPartitions().add(new SQLIdentifierExpr("ALL"));
|
||||
} else {
|
||||
this.exprParser.names(item.getPartitions(), item);
|
||||
}
|
||||
stmt.addItem(item);
|
||||
} else if (identifierEquals("FORCE")) {
|
||||
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
|
||||
} else if (identifierEquals("TRUNCATE")) {
|
||||
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
|
||||
} else if (identifierEquals("COALESCE")) {
|
||||
lexer.nextToken();
|
||||
accept(Token.PARTITION);
|
||||
@@ -2549,18 +2625,59 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
stmt.addItem(item);
|
||||
} else if (identifierEquals("EXCHANGE")) {
|
||||
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
|
||||
} else if (identifierEquals("ANALYZE")) {
|
||||
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
|
||||
} else if (identifierEquals("CHECK")) {
|
||||
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
|
||||
} else if (lexer.token() == Token.OPTIMIZE) {
|
||||
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
|
||||
lexer.nextToken();
|
||||
|
||||
accept(Token.PARTITION);
|
||||
|
||||
SQLAlterTableOptimizePartition item = new SQLAlterTableOptimizePartition();
|
||||
|
||||
if (lexer.token() == Token.ALL) {
|
||||
lexer.nextToken();
|
||||
item.getPartitions().add(new SQLIdentifierExpr("ALL"));
|
||||
} else {
|
||||
this.exprParser.names(item.getPartitions(), item);
|
||||
}
|
||||
|
||||
stmt.addItem(item);
|
||||
} else if (identifierEquals("REBUILD")) {
|
||||
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
|
||||
lexer.nextToken();
|
||||
|
||||
accept(Token.PARTITION);
|
||||
|
||||
SQLAlterTableRebuildPartition item = new SQLAlterTableRebuildPartition();
|
||||
|
||||
if (lexer.token() == Token.ALL) {
|
||||
lexer.nextToken();
|
||||
item.getPartitions().add(new SQLIdentifierExpr("ALL"));
|
||||
} else {
|
||||
this.exprParser.names(item.getPartitions(), item);
|
||||
}
|
||||
|
||||
stmt.addItem(item);
|
||||
} else if (identifierEquals("REPAIR")) {
|
||||
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
|
||||
lexer.nextToken();
|
||||
|
||||
accept(Token.PARTITION);
|
||||
|
||||
SQLAlterTableRepairPartition item = new SQLAlterTableRepairPartition();
|
||||
|
||||
if (lexer.token() == Token.ALL) {
|
||||
lexer.nextToken();
|
||||
item.getPartitions().add(new SQLIdentifierExpr("ALL"));
|
||||
} else {
|
||||
this.exprParser.names(item.getPartitions(), item);
|
||||
}
|
||||
|
||||
stmt.addItem(item);
|
||||
} else if (identifierEquals("REMOVE")) {
|
||||
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
|
||||
lexer.nextToken();
|
||||
acceptIdentifier("PARTITIONING");
|
||||
stmt.setRemovePatiting(true);
|
||||
} else if (identifierEquals("UPGRADE")) {
|
||||
lexer.nextToken();
|
||||
acceptIdentifier("PARTITIONING");
|
||||
stmt.setUpgradePatiting(true);
|
||||
} else if (identifierEquals("ALGORITHM")) {
|
||||
lexer.nextToken();
|
||||
accept(Token.EQ);
|
||||
|
||||
@@ -2413,6 +2413,17 @@ public class MySqlOutputVisitor extends SQLASTOutputVisitor implements MySqlASTV
|
||||
println();
|
||||
item.accept(this);
|
||||
}
|
||||
|
||||
if (x.isRemovePatiting()) {
|
||||
println();
|
||||
print0(ucase ? "REMOVE PARTITIONING" : "remove partitioning");
|
||||
}
|
||||
|
||||
if (x.isUpgradePatiting()) {
|
||||
println();
|
||||
print0(ucase ? "UPGRADE PARTITIONING" : "upgrade partitioning");
|
||||
}
|
||||
|
||||
decrementIndent();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -80,107 +80,11 @@ import com.alibaba.druid.sql.ast.expr.SQLSomeExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLTimestampExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLUnaryExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLVariantRefExpr;
|
||||
import com.alibaba.druid.sql.ast.statement.NotNullConstraint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterDatabaseStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableAddColumn;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableAddConstraint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableAddIndex;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableAddPartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableAlterColumn;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableCoalescePartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableConvertCharSet;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDisableConstraint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDisableKeys;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDisableLifecycle;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropColumnItem;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropConstraint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropForeignKey;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropIndex;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropKey;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropPartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropPrimaryKey;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableEnableConstraint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableEnableKeys;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableEnableLifecycle;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableItem;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableReOrganizePartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableRename;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableRenameColumn;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableRenamePartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableSetComment;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableSetLifecycle;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableTouch;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterViewRenameStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAssignItem;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCallStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCharacterDataType;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCheck;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCloseStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLColumnCheck;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLColumnConstraint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLColumnDefinition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLColumnPrimaryKey;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLColumnReference;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLColumnUniqueKey;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCommentStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateDatabaseStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateIndexStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateTableStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateTriggerStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.*;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateTriggerStatement.TriggerEvent;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateTriggerStatement.TriggerType;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateViewStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDeleteStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropDatabaseStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropFunctionStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropIndexStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropProcedureStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropSequenceStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropTableSpaceStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropTableStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropTriggerStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropUserStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropViewStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLExplainStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLExprHint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLExprTableSource;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLFetchStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLForeignKeyConstraint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLForeignKeyImpl;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLGrantStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLIfStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLInsertStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLInsertStatement.ValuesClause;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLJoinTableSource;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLJoinTableSource.JoinType;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLLoopStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLOpenStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLPrimaryKey;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLPrimaryKeyImpl;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLReleaseSavePointStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLRevokeStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLRollbackStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSavePointStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSelect;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSelectGroupByClause;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSelectItem;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSelectOrderByItem;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSelectQueryBlock;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSelectStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSetStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLShowTablesStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSubqueryTableSource;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLTableElement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLTruncateStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLUnionQuery;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLUnionQueryTableSource;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLUnique;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLUniqueConstraint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLUpdateSetItem;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLUpdateStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLUseStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLWithSubqueryClause;
|
||||
import com.alibaba.druid.util.JdbcConstants;
|
||||
|
||||
public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements PrintableVisitor {
|
||||
@@ -3059,4 +2963,60 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Printab
|
||||
x.getCount().accept(this);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableTruncatePartition x) {
|
||||
print0(ucase ? "TRUNCATE PARTITION " : "truncate partition ");
|
||||
printlnAndAccept(x.getPartitions(), ",");
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableDiscardPartition x) {
|
||||
print0(ucase ? "DISCARD PARTITION " : "discard partition ");
|
||||
printlnAndAccept(x.getPartitions(), ",");
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableImportPartition x) {
|
||||
print0(ucase ? "IMPORT PARTITION " : "import partition ");
|
||||
printlnAndAccept(x.getPartitions(), ",");
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableAnalyzePartition x) {
|
||||
print0(ucase ? "ANALYZE PARTITION " : "analyze partition ");
|
||||
printlnAndAccept(x.getPartitions(), ",");
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableCheckPartition x) {
|
||||
print0(ucase ? "CHECK PARTITION " : "check partition ");
|
||||
printlnAndAccept(x.getPartitions(), ",");
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableOptimizePartition x) {
|
||||
print0(ucase ? "OPTIMIZE PARTITION " : "optimize partition ");
|
||||
printlnAndAccept(x.getPartitions(), ",");
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableRebuildPartition x) {
|
||||
print0(ucase ? "REBUILD PARTITION " : "rebuild partition ");
|
||||
printlnAndAccept(x.getPartitions(), ",");
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableRepairPartition x) {
|
||||
print0(ucase ? "REPAIR PARTITION " : "repair partition ");
|
||||
printlnAndAccept(x.getPartitions(), ",");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,99 +63,7 @@ import com.alibaba.druid.sql.ast.expr.SQLSomeExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLTimestampExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLUnaryExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLVariantRefExpr;
|
||||
import com.alibaba.druid.sql.ast.statement.NotNullConstraint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterDatabaseStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableAddColumn;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableAddConstraint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableAddIndex;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableAddPartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableAlterColumn;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableCoalescePartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableConvertCharSet;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDisableConstraint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDisableKeys;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDisableLifecycle;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropColumnItem;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropConstraint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropForeignKey;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropIndex;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropKey;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropPartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropPrimaryKey;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableEnableConstraint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableEnableKeys;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableEnableLifecycle;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableReOrganizePartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableRename;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableRenameColumn;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableRenamePartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableSetComment;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableSetLifecycle;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableTouch;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterViewRenameStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAssignItem;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLBlockStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCallStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCharacterDataType;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCheck;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCloseStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLColumnCheck;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLColumnDefinition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLColumnPrimaryKey;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLColumnReference;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLColumnUniqueKey;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCommentStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateDatabaseStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateIndexStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateProcedureStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateTableStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateTriggerStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateViewStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDeleteStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropDatabaseStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropFunctionStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropIndexStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropProcedureStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropSequenceStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropTableSpaceStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropTableStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropTriggerStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropUserStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropViewStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLExplainStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLExprHint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLExprTableSource;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLFetchStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLForeignKeyImpl;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLGrantStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLIfStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLInsertStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLJoinTableSource;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLLoopStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLOpenStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLPrimaryKeyImpl;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLReleaseSavePointStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLRevokeStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLRollbackStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSavePointStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSelect;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSelectGroupByClause;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSelectItem;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSelectOrderByItem;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSelectQueryBlock;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSelectStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSetStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLShowTablesStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSubqueryTableSource;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLTruncateStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLUnionQuery;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLUnionQueryTableSource;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLUnique;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLUpdateSetItem;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLUpdateStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLUseStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLWithSubqueryClause;
|
||||
import com.alibaba.druid.sql.ast.statement.*;
|
||||
|
||||
public interface SQLASTVisitor {
|
||||
|
||||
@@ -750,4 +658,36 @@ public interface SQLASTVisitor {
|
||||
boolean visit(SQLAlterTableCoalescePartition x);
|
||||
|
||||
void endVisit(SQLAlterTableCoalescePartition x);
|
||||
|
||||
boolean visit(SQLAlterTableTruncatePartition x);
|
||||
|
||||
void endVisit(SQLAlterTableTruncatePartition x);
|
||||
|
||||
boolean visit(SQLAlterTableDiscardPartition x);
|
||||
|
||||
void endVisit(SQLAlterTableDiscardPartition x);
|
||||
|
||||
boolean visit(SQLAlterTableImportPartition x);
|
||||
|
||||
void endVisit(SQLAlterTableImportPartition x);
|
||||
|
||||
boolean visit(SQLAlterTableAnalyzePartition x);
|
||||
|
||||
void endVisit(SQLAlterTableAnalyzePartition x);
|
||||
|
||||
boolean visit(SQLAlterTableCheckPartition x);
|
||||
|
||||
void endVisit(SQLAlterTableCheckPartition x);
|
||||
|
||||
boolean visit(SQLAlterTableOptimizePartition x);
|
||||
|
||||
void endVisit(SQLAlterTableOptimizePartition x);
|
||||
|
||||
boolean visit(SQLAlterTableRebuildPartition x);
|
||||
|
||||
void endVisit(SQLAlterTableRebuildPartition x);
|
||||
|
||||
boolean visit(SQLAlterTableRepairPartition x);
|
||||
|
||||
void endVisit(SQLAlterTableRepairPartition x);
|
||||
}
|
||||
|
||||
@@ -64,100 +64,8 @@ import com.alibaba.druid.sql.ast.expr.SQLSomeExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLTimestampExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLUnaryExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLVariantRefExpr;
|
||||
import com.alibaba.druid.sql.ast.statement.NotNullConstraint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterDatabaseStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableAddColumn;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableAddConstraint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableAddIndex;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableAddPartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableAlterColumn;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableCoalescePartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableConvertCharSet;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDisableConstraint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDisableKeys;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDisableLifecycle;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropColumnItem;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropConstraint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropForeignKey;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropIndex;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropKey;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropPartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropPrimaryKey;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableEnableConstraint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableEnableKeys;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableEnableLifecycle;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableReOrganizePartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableRename;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableRenameColumn;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableRenamePartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableSetComment;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableSetLifecycle;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableTouch;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterViewRenameStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAssignItem;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLBlockStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCallStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCharacterDataType;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCheck;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCloseStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLColumnCheck;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLColumnDefinition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLColumnPrimaryKey;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLColumnReference;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLColumnUniqueKey;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCommentStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateDatabaseStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateIndexStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateProcedureStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateTableStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateTriggerStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateViewStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDeleteStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropDatabaseStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropFunctionStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropIndexStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropProcedureStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropSequenceStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropTableSpaceStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropTableStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropTriggerStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropUserStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLDropViewStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLExplainStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLExprHint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLExprTableSource;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLFetchStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLForeignKeyImpl;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLGrantStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLIfStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLInsertStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.*;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLInsertStatement.ValuesClause;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLJoinTableSource;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLLoopStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLOpenStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLPrimaryKeyImpl;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLReleaseSavePointStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLRevokeStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLRollbackStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSavePointStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSelect;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSelectGroupByClause;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSelectItem;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSelectOrderByItem;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSelectQueryBlock;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSelectStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSetStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLShowTablesStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSubqueryTableSource;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLTruncateStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLUnionQuery;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLUnionQueryTableSource;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLUnique;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLUpdateSetItem;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLUpdateStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLUseStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLWithSubqueryClause;
|
||||
|
||||
public class SQLASTVisitorAdapter implements SQLASTVisitor {
|
||||
|
||||
@@ -376,11 +284,11 @@ public class SQLASTVisitorAdapter implements SQLASTVisitor {
|
||||
|
||||
public void endVisit(SQLColumnDefinition x) {
|
||||
}
|
||||
|
||||
|
||||
public boolean visit(SQLColumnDefinition.Identity x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public void endVisit(SQLColumnDefinition.Identity x) {
|
||||
}
|
||||
|
||||
@@ -432,11 +340,11 @@ public class SQLASTVisitorAdapter implements SQLASTVisitor {
|
||||
|
||||
public void endVisit(SQLCreateViewStatement x) {
|
||||
}
|
||||
|
||||
|
||||
public boolean visit(SQLCreateViewStatement.Column x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public void endVisit(SQLCreateViewStatement.Column x) {
|
||||
}
|
||||
|
||||
@@ -1055,242 +963,242 @@ public class SQLASTVisitorAdapter implements SQLASTVisitor {
|
||||
public boolean visit(SQLAlterTableAddConstraint x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLCreateTriggerStatement x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLCreateTriggerStatement x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLDropFunctionStatement x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLDropFunctionStatement x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLDropTableSpaceStatement x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLDropTableSpaceStatement x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLDropProcedureStatement x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLDropProcedureStatement x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLBooleanExpr x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLBooleanExpr x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLUnionQueryTableSource x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLUnionQueryTableSource x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLTimestampExpr x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLTimestampExpr x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLRevokeStatement x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLRevokeStatement x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLBinaryExpr x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLBinaryExpr x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLAlterTableRename x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableRename x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLAlterViewRenameStatement x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterViewRenameStatement x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLShowTablesStatement x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLShowTablesStatement x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLAlterTableAddPartition x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableAddPartition x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLAlterTableDropPartition x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableDropPartition x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLAlterTableRenamePartition x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableRenamePartition x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLAlterTableSetComment x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableSetComment x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLAlterTableSetLifecycle x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableSetLifecycle x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLAlterTableEnableLifecycle x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableEnableLifecycle x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLAlterTableDisableLifecycle x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableDisableLifecycle x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLAlterTableTouch x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableTouch x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLArrayExpr x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLArrayExpr x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLOpenStatement x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLOpenStatement x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLFetchStatement x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLFetchStatement x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLCloseStatement x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLCloseStatement x) {
|
||||
return true;
|
||||
@@ -1303,7 +1211,7 @@ public class SQLASTVisitorAdapter implements SQLASTVisitor {
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLGroupingSetExpr x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1313,7 +1221,7 @@ public class SQLASTVisitorAdapter implements SQLASTVisitor {
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLIfStatement x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1323,17 +1231,17 @@ public class SQLASTVisitorAdapter implements SQLASTVisitor {
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLIfStatement.Else x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLIfStatement.ElseIf x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLIfStatement.ElseIf x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1343,7 +1251,7 @@ public class SQLASTVisitorAdapter implements SQLASTVisitor {
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLLoopStatement x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1353,7 +1261,7 @@ public class SQLASTVisitorAdapter implements SQLASTVisitor {
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLParameter x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1363,7 +1271,7 @@ public class SQLASTVisitorAdapter implements SQLASTVisitor {
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLCreateProcedureStatement x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1373,7 +1281,7 @@ public class SQLASTVisitorAdapter implements SQLASTVisitor {
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLBlockStatement x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1383,7 +1291,7 @@ public class SQLASTVisitorAdapter implements SQLASTVisitor {
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLAlterTableDropKey x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1399,80 +1307,80 @@ public class SQLASTVisitorAdapter implements SQLASTVisitor {
|
||||
public boolean visit(SQLPartitionValue x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLPartitionValue x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLPartition x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLPartition x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLPartitionByRange x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLPartitionByRange x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLPartitionByHash x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLPartitionByHash x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLPartitionByList x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLPartitionByList x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLSubPartition x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLSubPartition x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLSubPartitionByHash x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLSubPartitionByHash x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLSubPartitionByList x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLSubPartitionByList x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1482,37 +1390,117 @@ public class SQLASTVisitorAdapter implements SQLASTVisitor {
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLAlterDatabaseStatement x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableConvertCharSet x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLAlterTableConvertCharSet x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableReOrganizePartition x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLAlterTableReOrganizePartition x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableCoalescePartition x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLAlterTableCoalescePartition x) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableTruncatePartition x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLAlterTableTruncatePartition x) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableDiscardPartition x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLAlterTableDiscardPartition x) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableImportPartition x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLAlterTableImportPartition x) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableAnalyzePartition x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLAlterTableAnalyzePartition x) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableCheckPartition x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLAlterTableCheckPartition x) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableOptimizePartition x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLAlterTableOptimizePartition x) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableRebuildPartition x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLAlterTableRebuildPartition x) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableRepairPartition x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endVisit(SQLAlterTableRepairPartition x) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -51,17 +51,25 @@ import com.alibaba.druid.sql.ast.expr.SQLPropertyExpr;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterDatabaseStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableAddColumn;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableAddIndex;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableAnalyzePartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableCheckPartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableCoalescePartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableConvertCharSet;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDisableConstraint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDiscardPartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropConstraint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropForeignKey;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableDropPartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableEnableConstraint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableImportPartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableItem;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableOptimizePartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableReOrganizePartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableRebuildPartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableRename;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableRepairPartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableTruncatePartition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLBlockStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCallStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCheck;
|
||||
@@ -1532,4 +1540,44 @@ public class SchemaStatVisitor extends SQLASTVisitorAdapter {
|
||||
public boolean visit(SQLAlterTableCoalescePartition x) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableTruncatePartition x) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableDiscardPartition x) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableImportPartition x) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableAnalyzePartition x) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableCheckPartition x) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableOptimizePartition x) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableRebuildPartition x) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLAlterTableRepairPartition x) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user