mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
new feature : sql builder
This commit is contained in:
@@ -27,7 +27,12 @@ public class SQLExprTableSource extends SQLTableSourceImpl {
|
||||
}
|
||||
|
||||
public SQLExprTableSource(SQLExpr expr){
|
||||
this(expr, null);
|
||||
}
|
||||
|
||||
public SQLExprTableSource(SQLExpr expr, String alias){
|
||||
this.setExpr(expr);
|
||||
this.setAlias(alias);
|
||||
}
|
||||
|
||||
public SQLExpr getExpr() {
|
||||
|
||||
@@ -82,6 +82,11 @@ public class SQLSelectQueryBlock extends SQLObjectImpl implements SQLSelectQuery
|
||||
public List<SQLSelectItem> getSelectList() {
|
||||
return this.selectList;
|
||||
}
|
||||
|
||||
public void addSelectItem(SQLSelectItem item) {
|
||||
this.selectList.add(item);
|
||||
item.setParent(this);
|
||||
}
|
||||
|
||||
public SQLTableSource getFrom() {
|
||||
return this.from;
|
||||
|
||||
@@ -75,6 +75,11 @@ public class SQLUpdateStatement extends SQLStatementImpl {
|
||||
public List<SQLUpdateSetItem> getItems() {
|
||||
return items;
|
||||
}
|
||||
|
||||
public void addItem(SQLUpdateSetItem item) {
|
||||
this.items.add(item);
|
||||
item.setParent(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void output(StringBuffer buf) {
|
||||
|
||||
Reference in New Issue
Block a user