mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved sql parser, bug fixed for parent is null
This commit is contained in:
+5
-2
@@ -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() {
|
||||
|
||||
+1
-1
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user