mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved sql parser, support pg udpate_from_clause. issue #1430
This commit is contained in:
@@ -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 ");
|
||||
|
||||
Reference in New Issue
Block a user