refactor sql parser. improved db2 sql support. bug fixed for issue #2033

This commit is contained in:
wenshao
2017-10-09 15:47:16 +08:00
parent 08cc982f2e
commit f4d3310734
26 changed files with 583 additions and 186 deletions
@@ -39,15 +39,19 @@ public class SQLCreateTableStatement extends SQLStatementImpl implements SQLDDLS
protected List<SQLTableElement> tableElementList = new ArrayList<SQLTableElement>();
// for postgresql
private SQLExprTableSource inherits;
protected SQLExprTableSource inherits;
protected SQLSelect select;
protected SQLExpr comment;
protected SQLExprTableSource like;
protected SQLExprTableSource like;
protected Boolean compress;
protected Boolean logging;
protected SQLName tablespace;
protected SQLPartitionBy partitioning;
public SQLCreateTableStatement(){
@@ -176,6 +180,45 @@ public class SQLCreateTableStatement extends SQLStatementImpl implements SQLDDLS
this.like = like;
}
public Boolean getCompress() {
return compress;
}
public void setCompress(Boolean compress) {
this.compress = compress;
}
public Boolean getLogging() {
return logging;
}
public void setLogging(Boolean logging) {
this.logging = logging;
}
public SQLName getTablespace() {
return tablespace;
}
public void setTablespace(SQLName tablespace) {
if (tablespace != null) {
tablespace.setParent(this);
}
this.tablespace = tablespace;
}
public SQLPartitionBy getPartitioning() {
return partitioning;
}
public void setPartitioning(SQLPartitionBy partitioning) {
if (partitioning != null) {
partitioning.setParent(this);
}
this.partitioning = partitioning;
}
@Override
protected void accept0(SQLASTVisitor visitor) {
if (visitor.visit(this)) {