mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
backport sql parser improved from fastsql
This commit is contained in:
@@ -37,6 +37,11 @@ public final class SQLOrderBy extends SQLObjectImpl {
|
||||
addItem(item);
|
||||
}
|
||||
|
||||
public SQLOrderBy(SQLExpr expr, SQLOrderingSpecification type){
|
||||
SQLSelectOrderByItem item = new SQLSelectOrderByItem(expr, type);
|
||||
addItem(item);
|
||||
}
|
||||
|
||||
public void addItem(SQLSelectOrderByItem item) {
|
||||
if (item != null) {
|
||||
item.setParent(this);
|
||||
@@ -44,6 +49,10 @@ public final class SQLOrderBy extends SQLObjectImpl {
|
||||
this.items.add(item);
|
||||
}
|
||||
|
||||
public void addItem(SQLExpr item) {
|
||||
addItem(new SQLSelectOrderByItem(item));
|
||||
}
|
||||
|
||||
public List<SQLSelectOrderByItem> getItems() {
|
||||
return this.items;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user