improved sql parser, bug fixed for parent is null

This commit is contained in:
高铁
2016-02-27 19:21:28 +08:00
parent e86a34c07d
commit f5924d2661
86 changed files with 1038 additions and 667 deletions
@@ -41,8 +41,11 @@ public class SQLServerDeclareStatement extends SQLServerObjectImpl implements SQ
return items;
}
public void setItems(List<SQLDeclareItem> items) {
this.items = items;
public void addItem(SQLDeclareItem item) {
if (item != null) {
item.setParent(this);
}
this.items.add(item);
}
public String getDbType() {
@@ -168,7 +168,7 @@ public class SQLServerStatementParser extends SQLStatementParser {
for (;;) {
SQLDeclareItem item = new SQLDeclareItem();
declareStatement.getItems().add(item);
declareStatement.addItem(item);
item.setName(this.exprParser.name());