mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved sql parser.
This commit is contained in:
@@ -49,6 +49,7 @@ public class SQLCreateFunctionStatement extends SQLStatementImpl implements SQLC
|
||||
private boolean parallelEnable;
|
||||
private boolean aggregate;
|
||||
private SQLName using;
|
||||
private boolean pipelined;
|
||||
|
||||
public SQLCreateFunctionStatement clone() {
|
||||
SQLCreateFunctionStatement x = new SQLCreateFunctionStatement();
|
||||
@@ -78,6 +79,7 @@ public class SQLCreateFunctionStatement extends SQLStatementImpl implements SQLC
|
||||
}
|
||||
x.comment = comment;
|
||||
x.deterministic = deterministic;
|
||||
x.pipelined = pipelined;
|
||||
|
||||
return x;
|
||||
}
|
||||
@@ -238,4 +240,12 @@ public class SQLCreateFunctionStatement extends SQLStatementImpl implements SQLC
|
||||
public void setUsing(SQLName using) {
|
||||
this.using = using;
|
||||
}
|
||||
|
||||
public boolean isPipelined() {
|
||||
return pipelined;
|
||||
}
|
||||
|
||||
public void setPipelined(boolean pipelined) {
|
||||
this.pipelined = pipelined;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,8 +16,13 @@
|
||||
package com.alibaba.druid.sql.ast.statement;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLExpr;
|
||||
import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.SQLStatementImpl;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author zz [455910092@qq.com]
|
||||
@@ -27,7 +32,13 @@ public class SQLOpenStatement extends SQLStatementImpl{
|
||||
//cursor name
|
||||
private String cursorName;
|
||||
|
||||
private final List<SQLName> columns = new ArrayList<SQLName>();
|
||||
|
||||
private SQLExpr forExpr;
|
||||
|
||||
public SQLOpenStatement() {
|
||||
|
||||
}
|
||||
|
||||
public String getCursorName() {
|
||||
return cursorName;
|
||||
@@ -41,6 +52,7 @@ public class SQLOpenStatement extends SQLStatementImpl{
|
||||
protected void accept0(SQLASTVisitor visitor) {
|
||||
if (visitor.visit(this)) {
|
||||
acceptChild(visitor, forExpr);
|
||||
acceptChild(visitor, columns);
|
||||
}
|
||||
visitor.endVisit(this);
|
||||
}
|
||||
@@ -55,4 +67,8 @@ public class SQLOpenStatement extends SQLStatementImpl{
|
||||
}
|
||||
this.forExpr = forExpr;
|
||||
}
|
||||
|
||||
public List<SQLName> getColumns() {
|
||||
return columns;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user