final public SqlNodeList WithList() throws ParseException { SqlWithItem withItem; SqlParserPos pos; SqlNodeList list; jj_consume_token(WITH); list = new SqlNodeList(getPos()); withItem = WithItem(); list.add(withItem); label_22: while (true) { if (jj_2_237(2)) { ; } else { break label_22; } jj_consume_token(COMMA); withItem = WithItem(); list.add(withItem); } {if (true) return list;} throw new Error("Missing return statement in function"); }
jj_consume_token(SET); id = SimpleIdentifier(); updateColumnList.add(id); jj_consume_token(EQ); exp = Expression(ExprContext.ACCEPT_SUB_QUERY); updateExprList.add(exp); label_6: while (true) { updateColumnList.add(id); jj_consume_token(EQ); exp = Expression(ExprContext.ACCEPT_SUB_QUERY); updateExprList.add(exp);
/** * Creates the SELECT statement that putatively feeds rows into an UPDATE * statement to be updated. * * @param call Call to the UPDATE operator * @return select statement */ protected SqlSelect createSourceSelectForUpdate(SqlUpdate call) { final SqlNodeList selectList = new SqlNodeList(SqlParserPos.ZERO); selectList.add(SqlIdentifier.star(SqlParserPos.ZERO)); int ordinal = 0; for (SqlNode exp : call.getSourceExpressionList()) { // Force unique aliases to avoid a duplicate for Y with // SET X=Y String alias = SqlUtil.deriveAliasFromOrdinal(ordinal); selectList.add(SqlValidatorUtil.addAlias(exp, alias)); ++ordinal; } SqlNode sourceTable = call.getTargetTable(); if (call.getAlias() != null) { sourceTable = SqlValidatorUtil.addAlias( sourceTable, call.getAlias().getSimple()); } return new SqlSelect(SqlParserPos.ZERO, null, selectList, sourceTable, call.getCondition(), null, null, null, null, null, null); }
final public SqlNodeList WithList() throws ParseException { SqlWithItem withItem; SqlParserPos pos; SqlNodeList list; jj_consume_token(WITH); list = new SqlNodeList(getPos()); withItem = WithItem(); list.add(withItem); label_22: while (true) { if (jj_2_237(2)) { ; } else { break label_22; } jj_consume_token(COMMA); withItem = WithItem(); list.add(withItem); } {if (true) return list;} throw new Error("Missing return statement in function"); }
/** * Creates the SELECT statement that putatively feeds rows into a DELETE * statement to be deleted. * * @param call Call to the DELETE operator * @return select statement */ protected SqlSelect createSourceSelectForDelete(SqlDelete call) { final SqlNodeList selectList = new SqlNodeList(SqlParserPos.ZERO); selectList.add(SqlIdentifier.star(SqlParserPos.ZERO)); SqlNode sourceTable = call.getTargetTable(); if (call.getAlias() != null) { sourceTable = SqlValidatorUtil.addAlias( sourceTable, call.getAlias().getSimple()); } return new SqlSelect(SqlParserPos.ZERO, null, selectList, sourceTable, call.getCondition(), null, null, null, null, null, null); }
jj_consume_token(SET); id = SimpleIdentifier(); updateColumnList.add(id); jj_consume_token(EQ); exp = Expression(ExprContext.ACCEPT_SUB_QUERY); updateExprList.add(exp); label_6: while (true) { updateColumnList.add(id); jj_consume_token(EQ); exp = Expression(ExprContext.ACCEPT_SUB_QUERY); updateExprList.add(exp);
selectList.add(SqlIdentifier.star(SqlParserPos.ZERO)); final SqlNodeList orderList; if (getInnerSelect(node) != null && isAggregate(getInnerSelect(node))) { selectList.add(SqlIdentifier.star(SqlParserPos.ZERO)); return new SqlSelect(SqlParserPos.ZERO, null, selectList, call.operand(0), null, null, null, null, null, null, null);
final private void SqlStmtList(SqlNodeList list) throws ParseException { list.add(SqlStmt()); }
e = Expression(ExprContext.ACCEPT_SUB_QUERY); args = new SqlNodeList(getPos()); args.add(e); jj_consume_token(COMMA); tl = JdbcOdbcDataType(); args.add(tl); jj_consume_token(RPAREN); } else if (jj_2_671(2)) { jj_consume_token(RPAREN); args = new SqlNodeList(s1.pos()); args.add(SqlIdentifier.star(s1.pos())); } else if (jj_2_667(2)) { jj_consume_token(LPAREN);
selectList.add(SqlIdentifier.star(SqlParserPos.ZERO));
field.getName(), SqlParserPos.ZERO); selectList.add( SqlValidatorUtil.addAlias(col, UPDATE_ANON_PREFIX + i)); ++i;
final public SqlNodeList WithList() throws ParseException {SqlWithItem withItem; SqlParserPos pos; SqlNodeList list; jj_consume_token(WITH); list = new SqlNodeList(getPos()); withItem = WithItem(); list.add(withItem); label_24: while (true) { if (jj_2_239(2)) { ; } else { break label_24; } jj_consume_token(COMMA); withItem = WithItem(); list.add(withItem); } {if ("" != null) return list;} throw new Error("Missing return statement in function"); }
e = Expression(ExprContext.ACCEPT_SUB_QUERY); args = new SqlNodeList(getPos()); args.add(e); jj_consume_token(COMMA); tl = JdbcOdbcDataType(); args.add(tl); jj_consume_token(RPAREN); } else if (jj_2_671(2)) { jj_consume_token(RPAREN); args = new SqlNodeList(s1.pos()); args.add(SqlIdentifier.star(s1.pos())); } else if (jj_2_667(2)) { jj_consume_token(LPAREN);
jj_consume_token(SET); id = SimpleIdentifier(); updateColumnList.add(id); jj_consume_token(EQ); exp = Expression(ExprContext.ACCEPT_SUB_QUERY); updateExprList.add(exp); label_8: while (true) { updateColumnList.add(id); jj_consume_token(EQ); exp = Expression(ExprContext.ACCEPT_SUB_QUERY); updateExprList.add(exp);
final public SqlNodeList SqlStmtsEof() throws ParseException {SqlParserPos pos; SqlNodeList stmts; pos = getPos(); stmts = new SqlNodeList(pos); stmts.add(SqlStmt()); label_5: while (true) { if (jj_2_51(2)) { ; } else { break label_5; } jj_consume_token(SEMICOLON); SqlStmtList(stmts); } if (jj_2_52(2)) { jj_consume_token(SEMICOLON); } else { ; } jj_consume_token(0); {if ("" != null) return stmts;} throw new Error("Missing return statement in function"); }
e = Expression(ExprContext.ACCEPT_SUB_QUERY); args = new SqlNodeList(getPos()); args.add(e); jj_consume_token(COMMA); tl = JdbcOdbcDataType(); args.add(tl); jj_consume_token(RPAREN); } else if (jj_2_676(2)) { jj_consume_token(RPAREN); args = new SqlNodeList(s1.pos()); args.add(SqlIdentifier.star(s1.pos())); } else if (jj_2_672(2)) { jj_consume_token(LPAREN);