Package org.apache.derby.impl.sql.compile

Examples of org.apache.derby.impl.sql.compile.SubqueryNode


/*
* <A NAME="existsExpression">existsExpression</A>
*/
  final public SubqueryNode existsExpression() throws ParseException, StandardException {
        SubqueryNode    subqueryNode;
    jj_consume_token(EXISTS);
    jj_consume_token(LEFT_PAREN);
    subqueryNode = tableSubquery(SubqueryNode.EXISTS_SUBQUERY, null);
    jj_consume_token(RIGHT_PAREN);
                {if (true) return subqueryNode;}
View Full Code Here


        ResultColumnList        derivedRCL = null;
        FromTable                       fromTable;
        FromTable                       tableReference;
        Object[]                        optionalTableClauses = new Object[OPTIONAL_TABLE_CLAUSES_SIZE];
        Properties                      tableProperties = null;
        SubqueryNode            derivedTable;
    if (jj_2_55(1)) {
      if (newInvocationFollows(1)) {
        javaToSQLNode = newInvocation();
      } else {
        switch (jj_nt.kind) {
        case TABLE:
          javaToSQLNode = vtiTableConstruct();
          break;
        default:
          jj_la1[190] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
        }
      }
      switch (jj_nt.kind) {
      case AS:
        jj_consume_token(AS);
        break;
      default:
        jj_la1[191] = jj_gen;
        ;
      }
      correlationName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true);
      switch (jj_nt.kind) {
      case LEFT_PAREN:
        jj_consume_token(LEFT_PAREN);
        derivedRCL = derivedColumnList();
        jj_consume_token(RIGHT_PAREN);
        break;
      default:
        jj_la1[192] = jj_gen;
        ;
      }
      switch (jj_nt.kind) {
      case DERBYDASHPROPERTIES:
        optionalTableClauses = optionalTableProperties();
        break;
      default:
        jj_la1[193] = jj_gen;
        ;
      }
                fromTable = (FromTable) nodeFactory.getNode(
                                                                C_NodeTypes.FROM_VTI,
                                                                javaToSQLNode.getJavaValueNode(),
                                                                correlationName,
                                                                derivedRCL,
                                                                ((optionalTableClauses != null) ?
                                                                        (Properties) optionalTableClauses[OPTIONAL_TABLE_CLAUSES_TABLE_PROPERTIES] :
                                                                        (Properties) null),
                                                                getContextManager());
                {if (true) return fromTable;}
    } else if (jj_2_56(1)) {
      /* identifier() used to be correlationName() */
              tableName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH);
      optionalTableClauses = optionalTableClauses();
                fromTable = (FromTable) nodeFactory.getNode(
                                                                                        C_NodeTypes.FROM_BASE_TABLE,
                                                                                        tableName,
                                                                                                (String) optionalTableClauses[OPTIONAL_TABLE_CLAUSES_CORRELATION_NAME],
                                                                                                (ResultColumnList) optionalTableClauses[OPTIONAL_TABLE_CLAUSES_DERIVED_RCL],
                                                                                                (Properties) optionalTableClauses[OPTIONAL_TABLE_CLAUSES_TABLE_PROPERTIES],
                                                                                        getContextManager());
                {if (true) return fromTable;}
    } else if (getToken(1).kind == LEFT_PAREN &&
                                    (
                                            getToken(2).kind == SELECT ||
                                            getToken(2).kind == VALUES
                                    )) {
      derivedTable = derivedTable();
      switch (jj_nt.kind) {
      case AS:
        jj_consume_token(AS);
        break;
      default:
        jj_la1[194] = jj_gen;
        ;
      }
      correlationName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true);
      switch (jj_nt.kind) {
      case LEFT_PAREN:
        jj_consume_token(LEFT_PAREN);
        derivedRCL = derivedColumnList();
        jj_consume_token(RIGHT_PAREN);
        break;
      default:
        jj_la1[195] = jj_gen;
        ;
      }
      switch (jj_nt.kind) {
      case DERBYDASHPROPERTIES:
        optionalTableClauses = optionalTableProperties();
        break;
      default:
        jj_la1[196] = jj_gen;
        ;
      }
                fromTable = (FromTable) nodeFactory.getNode(
                                                                                        C_NodeTypes.FROM_SUBQUERY,
                                                                                        derivedTable.getResultSet(),
                                                                                        derivedTable.getOrderByList(),
                                            derivedTable.getOffset(),
                                            derivedTable.getFetchFirst(),
                                                                                        correlationName,
                                                                                        derivedRCL,
                                                                                        ((optionalTableClauses != null) ?
                                                                                                (Properties) optionalTableClauses[OPTIONAL_TABLE_CLAUSES_TABLE_PROPERTIES] :
                                                                                                (Properties) null),
View Full Code Here

/*
* <A NAME="derivedTable">derivedTable</A>
*/
  final public SubqueryNode derivedTable() throws ParseException, StandardException {
        SubqueryNode tableSubquery;
    jj_consume_token(LEFT_PAREN);
    tableSubquery = tableSubquery(SubqueryNode.FROM_SUBQUERY, null);
    jj_consume_token(RIGHT_PAREN);
                {if (true) return tableSubquery;}
    throw new Error("Missing return statement in function");
View Full Code Here

/*
* <A NAME="tableSubquery">tableSubquery</A>
*/
  final public SubqueryNode tableSubquery(int subqueryType, ValueNode leftOperand) throws ParseException, StandardException {
        SubqueryNode    subqueryNode;
    subqueryNode = subquery(subqueryType, leftOperand);
                {if (true) return subqueryNode;}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

/*
* <A NAME="subquery">subquery</A>
*/
  final public SubqueryNode subquery(int subqueryType, ValueNode leftOperand) throws ParseException, StandardException {
        ResultSetNode   queryExpression;
        SubqueryNode    subqueryNode;
    queryExpression = queryExpression(null, NO_SET_OP);
                subqueryNode = (SubqueryNode) nodeFactory.getNode(
                                                                                C_NodeTypes.SUBQUERY_NODE,
                                                                                queryExpression,
                                                                                ReuseFactory.getInteger(subqueryType),
View Full Code Here

/*
* <A NAME="existsExpression">existsExpression</A>
*/
  final public SubqueryNode existsExpression() throws ParseException, StandardException {
        SubqueryNode    subqueryNode;
    jj_consume_token(EXISTS);
    jj_consume_token(LEFT_PAREN);
    subqueryNode = tableSubquery(SubqueryNode.EXISTS_SUBQUERY, null);
    jj_consume_token(RIGHT_PAREN);
                {if (true) return subqueryNode;}
View Full Code Here

/*
* <A NAME="derivedTable">derivedTable</A>
*/
  final public ResultSetNode derivedTable() throws ParseException, StandardException {
        SubqueryNode tableSubquery;
    jj_consume_token(LEFT_PAREN);
    tableSubquery = tableSubquery(SubqueryNode.FROM_SUBQUERY, null);
    jj_consume_token(RIGHT_PAREN);
                {if (true) return tableSubquery.getResultSet();}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

/*
* <A NAME="tableSubquery">tableSubquery</A>
*/
  final public SubqueryNode tableSubquery(int subqueryType, ValueNode leftOperand) throws ParseException, StandardException {
        SubqueryNode    subqueryNode;
    subqueryNode = subquery(subqueryType, leftOperand);
                {if (true) return subqueryNode;}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

/*
* <A NAME="subquery">subquery</A>
*/
  final public SubqueryNode subquery(int subqueryType, ValueNode leftOperand) throws ParseException, StandardException {
        ResultSetNode   queryExpression;
        SubqueryNode    subqueryNode;
    queryExpression = queryExpression(null, NO_SET_OP);
                subqueryNode = (SubqueryNode) nodeFactory.getNode(
                                                                                C_NodeTypes.SUBQUERY_NODE,
                                                                                queryExpression,
                                                                                ReuseFactory.getInteger(subqueryType),
View Full Code Here

/*
* <A NAME="existsExpression">existsExpression</A>
*/
  final public SubqueryNode existsExpression() throws ParseException, StandardException {
        SubqueryNode    subqueryNode;
    jj_consume_token(EXISTS);
    jj_consume_token(LEFT_PAREN);
    subqueryNode = tableSubquery(SubqueryNode.EXISTS_SUBQUERY, null);
    jj_consume_token(RIGHT_PAREN);
                {if (true) return subqueryNode;}
View Full Code Here

TOP

Related Classes of org.apache.derby.impl.sql.compile.SubqueryNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.