improved sql parser, support pg udpate_from_clause. issue #1430

This commit is contained in:
wenshao
2016-09-25 00:08:20 +08:00
parent 9e6067996b
commit baab4fede5
6 changed files with 84 additions and 23 deletions
@@ -27,6 +27,7 @@ public class SQLUpdateStatement extends SQLStatementImpl {
protected final List<SQLUpdateSetItem> items = new ArrayList<SQLUpdateSetItem>();
protected SQLExpr where;
protected SQLTableSource from;
protected SQLTableSource tableSource;
@@ -81,6 +82,17 @@ public class SQLUpdateStatement extends SQLStatementImpl {
item.setParent(this);
}
public SQLTableSource getFrom() {
return from;
}
public void setFrom(SQLTableSource from) {
if (from != null) {
from.setParent(this);
}
this.from = from;
}
@Override
public void output(StringBuffer buf) {
buf.append("UPDATE ");