backport sql parser improved from fastsql

This commit is contained in:
高铁
2019-10-05 01:50:37 +08:00
parent 20801d01ce
commit b79edab45f
110 changed files with 2766 additions and 838 deletions
@@ -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;
}