improved mysql parser, support more create view syntax.

This commit is contained in:
wenshao
2017-02-11 19:20:39 +08:00
parent 427c16d955
commit 1f3c5467eb
5 changed files with 194 additions and 51 deletions
@@ -33,6 +33,10 @@ public class SQLCreateViewStatement extends SQLStatementImpl implements SQLDDLSt
protected SQLSelect subQuery;
protected boolean ifNotExists = false;
protected String algorithm;
protected SQLName definer;
protected String sqlSecurity;
protected final List<Column> columns = new ArrayList<Column>();
private Level with;
@@ -109,6 +113,33 @@ public class SQLCreateViewStatement extends SQLStatementImpl implements SQLDDLSt
this.comment = comment;
}
public String getAlgorithm() {
return algorithm;
}
public void setAlgorithm(String algorithm) {
this.algorithm = algorithm;
}
public SQLName getDefiner() {
return definer;
}
public void setDefiner(SQLName definer) {
if (definer != null) {
definer.setParent(this);
}
this.definer = definer;
}
public String getSqlSecurity() {
return sqlSecurity;
}
public void setSqlSecurity(String sqlSecurity) {
this.sqlSecurity = sqlSecurity;
}
public void output(StringBuffer buf) {
buf.append("CREATE VIEW ");
this.name.output(buf);