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:
@@ -75,6 +75,13 @@ public class SQLAggregateExpr extends SQLExprImpl implements Serializable {
|
||||
public List<SQLExpr> getArguments() {
|
||||
return this.arguments;
|
||||
}
|
||||
|
||||
public void addArgument(SQLExpr argument) {
|
||||
if (argument != null) {
|
||||
argument.setParent(this);
|
||||
}
|
||||
this.arguments.add(argument);
|
||||
}
|
||||
|
||||
public SQLOver getOver() {
|
||||
return over;
|
||||
|
||||
@@ -29,6 +29,13 @@ public class SQLGroupingSetExpr extends SQLExprImpl {
|
||||
public List<SQLExpr> getParameters() {
|
||||
return parameters;
|
||||
}
|
||||
|
||||
public void addParameter(SQLExpr parameter) {
|
||||
if (parameter != null) {
|
||||
parameter.setParent(this);
|
||||
}
|
||||
this.parameters.add(parameter);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void accept0(SQLASTVisitor visitor) {
|
||||
|
||||
@@ -29,6 +29,13 @@ public class SQLListExpr extends SQLExprImpl {
|
||||
public List<SQLExpr> getItems() {
|
||||
return items;
|
||||
}
|
||||
|
||||
public void addItem(SQLExpr item) {
|
||||
if (item != null) {
|
||||
item.setParent(this);
|
||||
}
|
||||
this.items.add(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void accept0(SQLASTVisitor visitor) {
|
||||
|
||||
Reference in New Issue
Block a user