use of com.alibaba.druid.sql.dialect.sqlserver.ast.stmt.SQLServerExecStatement.SQLServerParameter in project druid by alibaba.
the class SQLServerStatementParser method parseExecParameter.
/**
* SQLServer parse Parameter statement support out type
* @author zz [455910092@qq.com]
*/
public void parseExecParameter(Collection<SQLServerParameter> exprCol, SQLObject parent) {
if (lexer.token() == Token.RPAREN || lexer.token() == Token.RBRACKET) {
return;
}
if (lexer.token() == Token.EOF) {
return;
}
SQLServerParameter param = new SQLServerParameter();
SQLExpr expr = this.exprParser.expr();
expr.setParent(parent);
param.setExpr(expr);
if (lexer.token() == Token.OUT) {
param.setType(true);
accept(Token.OUT);
}
exprCol.add(param);
while (lexer.token() == Token.COMMA) {
lexer.nextToken();
param = new SQLServerParameter();
expr = this.exprParser.expr();
expr.setParent(parent);
param.setExpr(expr);
if (lexer.token() == Token.OUT) {
param.setType(true);
accept(Token.OUT);
}
exprCol.add(param);
}
}
Aggregations