-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Improve gaussdb ddl parser * fix temp table
- Loading branch information
1 parent
a74a796
commit 1613a76
Showing
12 changed files
with
152 additions
and
483 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
112 changes: 0 additions & 112 deletions
112
.../src/main/java/com/alibaba/druid/sql/dialect/gaussdb/ast/GaussDbCreateTableStatement.java
This file was deleted.
Oops, something went wrong.
47 changes: 47 additions & 0 deletions
47
...main/java/com/alibaba/druid/sql/dialect/gaussdb/ast/stmt/GaussDbCreateTableStatement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package com.alibaba.druid.sql.dialect.gaussdb.ast.stmt; | ||
|
||
import com.alibaba.druid.DbType; | ||
import com.alibaba.druid.sql.ast.statement.SQLCreateTableStatement; | ||
import com.alibaba.druid.sql.dialect.gaussdb.ast.GaussDbDistributeBy; | ||
import com.alibaba.druid.sql.dialect.gaussdb.ast.GaussDbObject; | ||
import com.alibaba.druid.sql.dialect.gaussdb.visitor.GaussDbASTVisitor; | ||
import com.alibaba.druid.sql.visitor.SQLASTVisitor; | ||
|
||
public class GaussDbCreateTableStatement extends SQLCreateTableStatement implements GaussDbObject { | ||
protected GaussDbDistributeBy distributeBy; | ||
|
||
public GaussDbCreateTableStatement() { | ||
super(DbType.gaussdb); | ||
} | ||
|
||
public void setDistributeBy(GaussDbDistributeBy distributeBy) { | ||
if (distributeBy != null) { | ||
distributeBy.setParent(this); | ||
} | ||
this.distributeBy = distributeBy; | ||
} | ||
|
||
public GaussDbDistributeBy getDistributeBy() { | ||
return distributeBy; | ||
} | ||
|
||
@Override | ||
public void accept0(SQLASTVisitor v) { | ||
if (v instanceof GaussDbASTVisitor) { | ||
accept0((GaussDbASTVisitor) v); | ||
return; | ||
} | ||
if (v.visit(this)) { | ||
acceptChild(v); | ||
} | ||
v.endVisit(this); | ||
} | ||
|
||
@Override | ||
public void accept0(GaussDbASTVisitor visitor) { | ||
if (visitor.visit(this)) { | ||
acceptChild(visitor, this.distributeBy); | ||
acceptChild((SQLASTVisitor) visitor); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.