final public WhileStatement whileStatement(ParseInfo info) throws ParseException { WhileStatement whileStmt = null; Criteria criteria = null; Statement stmt = null; jj_consume_token(WHILE); jj_consume_token(LPAREN); criteria = criteria(info); jj_consume_token(RPAREN); stmt = statement(info); whileStmt = new WhileStatement(criteria, asBlock(stmt)); {if (true) return whileStmt;} throw new Error("Missing return statement in function"); }
/** Reinitialise. */ public void ReInit(java.io.InputStream stream) { ReInit(stream, null); } /** Reinitialise. */
final public void procedureRsColumn(MetadataFactory factory, Procedure proc) throws ParseException { String name = null; ParsedDataType type = null; boolean notNull = false; BaseColumn column = null; name = id(Boolean.TRUE); type = parseDataType(); column = addProcColumn(factory, proc, name, type, true); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case NOT: jj_consume_token(NOT); jj_consume_token(NULL); column.setNullType(Column.NullType.No_Nulls); break; default: jj_la1[391] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case OPTIONS: optionsClause(column, factory); OptionsUtil.setOptions(column); break; default: jj_la1[392] = jj_gen; ; } }
final public LoopStatement loopStatement(ParseInfo info) throws ParseException { LoopStatement loopStmt = null; String cursor = null; QueryCommand query = null; Statement stmt = null; jj_consume_token(LOOP); jj_consume_token(ON); jj_consume_token(LPAREN); query = queryExpression(info); jj_consume_token(RPAREN); jj_consume_token(AS); cursor = id(null); stmt = statement(info); loopStmt = new LoopStatement(asBlock(stmt), query, cursor); {if (true) return loopStmt;} throw new Error("Missing return statement in function"); }
Expression condition = null; ParsedDataType type = null; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CHAR: case CAST: case USAGE: case ID: if (jj_2_35(2)) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case TEXTAGG: expression = textAgg(info); break; case ANY: case VAR_SAMP: case VAR_POP: expression = aggregateSymbol(info); break; case ARRAY_AGG: case XMLAGG: case JSONARRAY_AGG: expression = orderedAgg(info); break; default: jj_la1[251] = jj_gen; jj_consume_token(-1); throw new ParseException();
Token comment = null; boolean virtual = true; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case FOREIGN: case VIRTUAL: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case VIRTUAL: jj_consume_token(VIRTUAL); break; case FOREIGN: jj_consume_token(FOREIGN); virtual=false; break; default: jj_la1[456] = jj_gen; jj_consume_token(-1); throw new ParseException(); jj_consume_token(PROCEDURE); objectName = id(null); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AS: jj_consume_token(AS); comment = getToken(1).specialToken; stmt = statement(info); CreateProcedureCommand cup = new CreateProcedureCommand(asBlock(stmt)); if (comment != null) { cup.setCacheHint(getQueryCacheOption(comment.image));
boolean function = false; String procName = null; jj_consume_token(CREATE); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case FOREIGN: case VIRTUAL: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case VIRTUAL: jj_consume_token(VIRTUAL); break; case FOREIGN: jj_consume_token(FOREIGN); virtual = false; break; default: jj_la1[370] = jj_gen; jj_consume_token(-1); throw new ParseException(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PROCEDURE: jj_consume_token(PROCEDURE); break; case FUNCTION: jj_consume_token(FUNCTION); function = true; break; default: jj_la1[372] = jj_gen;
Limit limit = null; SetQuery.Operation type; query = queryTerm(info); label_10: while (true) { if (jj_2_17(1)) { if (jj_2_18(2147483647) && (getToken(2).kind != JOIN)) { jj_consume_token(UNION); type = SetQuery.Operation.UNION; } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EXCEPT: jj_consume_token(EXCEPT); type = SetQuery.Operation.EXCEPT; break; default: jj_la1[89] = jj_gen; jj_consume_token(-1); throw new ParseException(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ALL: case DISTINCT: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ALL: jj_consume_token(ALL); all = true; break;
boolean after = false; String name = null; jj_consume_token(ALTER); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case VIEW: jj_consume_token(VIEW); target = id(null); jj_consume_token(AS); comment = getToken(1).specialToken; command = queryExpression(info); if (comment != null) { command.setCacheHint(getQueryCacheOption(comment.image)); break; case PROCEDURE: jj_consume_token(PROCEDURE); target = id(null); jj_consume_token(AS); comment = getToken(1).specialToken; stmt = statement(info); CreateProcedureCommand cup = new CreateProcedureCommand(asBlock(stmt)); if (comment != null) { cup.setCacheHint(getQueryCacheOption(comment.image)); break; case TRIGGER: jj_consume_token(TRIGGER); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INSTEAD:
String groupID2 = null; boolean not = false; jj_consume_token(IF); jj_consume_token(LPAREN); if (jj_2_9(4)) { groupID = id(null); jj_consume_token(IS); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case NOT: jj_consume_token(NOT); not = true; break; jj_consume_token(DISTINCT); jj_consume_token(FROM); groupID2 = id(null); IsDistinctCriteria idc = new IsDistinctCriteria(); idc.setLeftRowValue(new GroupSymbol(groupID)); criteria = idc; } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CHAR: case DATE: case QMARK: case DOLLAR: criteria = criteria(info); break;
Boolean atomic = null; String eId = null; jj_consume_token(BEGIN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ATOMIC: case NOT: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case NOT: jj_consume_token(NOT); atomic = Boolean.FALSE; break; jj_consume_token(ATOMIC); if (atomic == null) {atomic = Boolean.TRUE;} break; if (jj_2_8(2)) { stmt = statement(info); block.addStatement(stmt, false); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EXCEPTION: jj_consume_token(EXCEPTION); eId = id(Boolean.FALSE); block.setExceptionGroup(eId); label_4: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
KeyRecord key = null; List<Expression> expressions = null; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case UNIQUE: case ACCESSPATTERN: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case UNIQUE: type = jj_consume_token(UNIQUE); break; case ACCESSPATTERN: type = jj_consume_token(ACCESSPATTERN); break; default: jj_la1[407] = jj_gen; jj_consume_token(-1); throw new ParseException(); columnNames = columnList(true, false); if (type.image.equalsIgnoreCase("UNIQUE")) { {if (true) return factory.addIndex(name != null?name:("UNIQUE"+table.getUniqueKeys().size()), false, columnNames, table);} type = jj_consume_token(INDEX); jj_consume_token(LPAREN); expressions = expressionList(info); jj_consume_token(RPAREN); {if (true) return addFBI(factory, expressions, table, name);} break; default: jj_la1[408] = jj_gen;
final public void alterOptionsList(String objectName, Database.ResourceType type, DatabaseStore dbStore) throws ParseException { jj_consume_token(OPTIONS); jj_consume_token(LPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ADD: case SET: addSetOption(objectName, type, dbStore); break; case DROP: dropOption(objectName, type, dbStore); break; default: jj_la1[462] = jj_gen; jj_consume_token(-1); throw new ParseException(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ADD: case SET: addSetOption(objectName, type, dbStore); break; case DROP: dropOption(objectName, type, dbStore); break; default: jj_la1[464] = jj_gen;
final public void alterChildOptionsList(String objectName, Database.ResourceType type, String childName, Database.ResourceType childType, DatabaseStore dbStore) throws ParseException { jj_consume_token(OPTIONS); jj_consume_token(LPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ADD: case SET: addSetChildOption(objectName, type, childName, childType, dbStore); break; case DROP: dropChildOption(objectName, type, childName, childType, dbStore); break; default: jj_la1[444] = jj_gen; jj_consume_token(-1); throw new ParseException(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ADD: case SET: addSetChildOption(objectName, type, childName, childType, dbStore); break; case DROP: dropChildOption(objectName, type, childName, childType, dbStore); break; default: jj_la1[446] = jj_gen;
QueryCommand rightQuery = null; boolean all = false; query = queryPrimary(info); label_11: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INTERSECT: jj_consume_token(INTERSECT); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ALL: case DISTINCT: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ALL: jj_consume_token(ALL); all = true; break; case DISTINCT: jj_consume_token(DISTINCT); break; default: jj_la1[95] = jj_gen; jj_consume_token(-1); throw new ParseException(); rightQuery = queryPrimary(info); query = addQueryToSetOperation(query, rightQuery, SetQuery.Operation.INTERSECT, all); all = false;
final public Expression selectSymbol(ParseInfo info) throws ParseException { Expression symbol = null; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CHAR: case DATE: case QMARK: case DOLLAR: symbol = selectExpression(info); break; case ALL_IN_GROUP: symbol = allInGroupSymbol(); break; default: jj_la1[108] = jj_gen; jj_consume_token(-1); throw new ParseException();
private void helpStmtTest(String stmt, String expectedString, Statement expectedStmt) throws ParseException { Statement actualStmt = new SQLParser(new StringReader(stmt)).statement(new ParseInfo()); String actualString = actualStmt.toString(); assertEquals("Parse string does not match: ", expectedString, actualString); //$NON-NLS-1$ assertEquals("Language objects do not match: ", expectedStmt, actualStmt); //$NON-NLS-1$ }
Expression condition = null; ParsedDataType type = null; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CHAR: case CAST: case LISTAGG: case ID: if (jj_2_35(2)) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case TEXTAGG: expression = textAgg(info); break; case ANY: case VAR_SAMP: case VAR_POP: expression = aggregateSymbol(info); break; case ARRAY_AGG: case XMLAGG: case JSONARRAY_AGG: expression = orderedAgg(info); break; default: jj_la1[253] = jj_gen; jj_consume_token(-1); throw new ParseException();
Token comment = null; boolean virtual = true; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case FOREIGN: case VIRTUAL: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case VIRTUAL: jj_consume_token(VIRTUAL); break; case FOREIGN: jj_consume_token(FOREIGN); virtual=false; break; default: jj_la1[456] = jj_gen; jj_consume_token(-1); throw new ParseException(); jj_consume_token(PROCEDURE); objectName = id(null); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AS: jj_consume_token(AS); comment = getToken(1).specialToken; stmt = statement(info); CreateProcedureCommand cup = new CreateProcedureCommand(asBlock(stmt)); if (comment != null) { cup.setCacheHint(getQueryCacheOption(comment.image));