use of com.alibaba.druid.sql.ast.expr.SQLListExpr in project druid by alibaba.
the class OracleSelectParser method parseInto.
protected void parseInto(OracleSelectQueryBlock x) {
if (lexer.token() == Token.INTO) {
lexer.nextToken();
SQLExpr expr = expr();
if (lexer.token() != Token.COMMA) {
x.setInto(expr);
return;
}
SQLListExpr list = new SQLListExpr();
list.addItem(expr);
while (lexer.token() == Token.COMMA) {
lexer.nextToken();
list.addItem(expr());
}
x.setInto(list);
}
}
use of com.alibaba.druid.sql.ast.expr.SQLListExpr in project druid by alibaba.
the class OdpsSelectParser method parseTableSource.
public SQLTableSource parseTableSource() {
if (lexer.token() == Token.VALUES) {
lexer.nextToken();
OdpsValuesTableSource tableSource = new OdpsValuesTableSource();
for (; ; ) {
accept(Token.LPAREN);
SQLListExpr listExpr = new SQLListExpr();
this.exprParser.exprList(listExpr.getItems(), listExpr);
accept(Token.RPAREN);
listExpr.setParent(tableSource);
tableSource.getValues().add(listExpr);
if (lexer.token() == Token.COMMA) {
lexer.nextToken();
continue;
}
break;
}
String alias = this.as();
tableSource.setAlias(alias);
accept(Token.LPAREN);
this.exprParser.names(tableSource.getColumns(), tableSource);
accept(Token.RPAREN);
return tableSource;
}
return super.parseTableSource();
}
Aggregations