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

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


        JavaToSQLValueNode      javaToSQLNode = null;
        TableName                       tableName;
        String                          correlationName = null;
        ResultColumnList        derivedRCL = null;
        FromTable                       fromTable;
        TableOperatorNode       joinTable = null;
        FromTable                       tableReference;
        Object[]                        optionalTableClauses = new Object[OPTIONAL_TABLE_CLAUSES_SIZE];
        Properties                      tableProperties = null;
        ResultSetNode           derivedTable;
    if (jj_2_41(1)) {
View Full Code Here


                {if (true) return tableSubquery.getResultSet();}
    throw new Error("Missing return statement in function");
  }

  final public TableOperatorNode joinedTableExpression(ResultSetNode leftRSN, boolean nestedInParens) throws ParseException, StandardException {
        TableOperatorNode joinNode;
    joinNode = qualifiedJoin(leftRSN, nestedInParens);
                {if (true) return joinNode;}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

  }

  final public TableOperatorNode qualifiedJoin(ResultSetNode leftRSN, boolean nestedInParens) throws ParseException, StandardException {
        int                                     joinType = JoinNode.INNERJOIN;
        ResultSetNode           rightRSN;
        TableOperatorNode       ton = null;
        Object[]                        onOrUsingClause = null;
        ResultColumnList        usingClause = null;
        ValueNode                       onClause;
    switch (jj_nt.kind) {
    case INNER:
    case LEFT:
    case RIGHT:
      joinType = joinType();
      break;
    default:
      jj_la1[193] = jj_gen;
      ;
    }
    jj_consume_token(JOIN);
    rightRSN = tableReferenceTypes(nestedInParens);
    onOrUsingClause = joinSpecification(leftRSN, rightRSN);
                /* If NATURAL OR UNION is specified, then no joinSpecification()
     * is required, otherwise it is required.
     */

                /* RESOLVE - Since we don't support NATURAL or UNION joins yet,
     * onOrUsingClause must be non-null.  (Change error message if and
     * when grammar changes.)
     */

                /* Figure out whether an ON or USING clause was used */
                onClause = (ValueNode) onOrUsingClause[ON_CLAUSE];
                usingClause = (ResultColumnList) onOrUsingClause[USING_CLAUSE];

                if (onClause == null && usingClause == null)
                {
                        {if (true) throw StandardException.newException(SQLState.LANG_MISSING_JOIN_SPECIFICATION,
                                                        JoinNode.joinTypeToString(joinType));}
                }

                switch(joinType)
                {
                        case JoinNode.INNERJOIN:
                                ton = (TableOperatorNode) nodeFactory.getNode(
                                                                        C_NodeTypes.JOIN_NODE,
                                                                        leftRSN,
                                                                        rightRSN,
                                                                        onClause,
                                                                        usingClause,
                                                                        null,
                                                                        null,
                                                                        null,
                                                                        getContextManager());
                                break;

                        case JoinNode.LEFTOUTERJOIN:
                                ton = (TableOperatorNode) nodeFactory.getNode(
                                                                                C_NodeTypes.HALF_OUTER_JOIN_NODE,
                                                                                leftRSN,
                                                                                rightRSN,
                                                                                onClause,
                                                                                usingClause,
                                                                                Boolean.FALSE,
                                                                                null,
                                                                                getContextManager());
                                break;

                        case JoinNode.RIGHTOUTERJOIN:
                                ton = (TableOperatorNode) nodeFactory.getNode(
                                                                                C_NodeTypes.HALF_OUTER_JOIN_NODE,
                                                                                leftRSN,
                                                                                rightRSN,
                                                                                onClause,
                                                                                usingClause,
                                                                                Boolean.TRUE,
                                                                                null,
                                                                                getContextManager());
                                break;


                        default:
                                if (SanityManager.DEBUG)
                                {
                                        SanityManager.ASSERT(false, "Unexpected joinType");
                                }
                                {if (true) return null;}
                }

                /* Mark whether or not we are nested within parens */
                ton.setNestedInParens(nestedInParens);
                {if (true) return ton;}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

        JavaToSQLValueNode      javaToSQLNode = null;
        TableName                       tableName;
        String                          correlationName = null;
        ResultColumnList        derivedRCL = null;
        FromTable                       fromTable;
        TableOperatorNode       joinTable = null;
        FromTable                       tableReference;
        Object[]                        optionalTableClauses = new Object[OPTIONAL_TABLE_CLAUSES_SIZE];
        Properties                      tableProperties = null;
        ResultSetNode           derivedTable;
    if (jj_2_41(1)) {
View Full Code Here

                {if (true) return tableSubquery.getResultSet();}
    throw new Error("Missing return statement in function");
  }

  final public TableOperatorNode joinedTableExpression(ResultSetNode leftRSN, boolean nestedInParens) throws ParseException, StandardException {
        TableOperatorNode joinNode;
    joinNode = qualifiedJoin(leftRSN, nestedInParens);
                {if (true) return joinNode;}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

  }

  final public TableOperatorNode qualifiedJoin(ResultSetNode leftRSN, boolean nestedInParens) throws ParseException, StandardException {
        int                                     joinType = JoinNode.INNERJOIN;
        ResultSetNode           rightRSN;
        TableOperatorNode       ton = null;
        Object[]                        onOrUsingClause = null;
        ResultColumnList        usingClause = null;
        ValueNode                       onClause;
    switch (jj_nt.kind) {
    case INNER:
    case LEFT:
    case RIGHT:
      joinType = joinType();
      break;
    default:
      jj_la1[193] = jj_gen;
      ;
    }
    jj_consume_token(JOIN);
    rightRSN = tableReferenceTypes(nestedInParens);
    onOrUsingClause = joinSpecification(leftRSN, rightRSN);
                /* If NATURAL OR UNION is specified, then no joinSpecification()
     * is required, otherwise it is required.
     */

                /* RESOLVE - Since we don't support NATURAL or UNION joins yet,
     * onOrUsingClause must be non-null.  (Change error message if and
     * when grammar changes.)
     */

                /* Figure out whether an ON or USING clause was used */
                onClause = (ValueNode) onOrUsingClause[ON_CLAUSE];
                usingClause = (ResultColumnList) onOrUsingClause[USING_CLAUSE];

                if (onClause == null && usingClause == null)
                {
                        {if (true) throw StandardException.newException(SQLState.LANG_MISSING_JOIN_SPECIFICATION,
                                                        JoinNode.joinTypeToString(joinType));}
                }

                switch(joinType)
                {
                        case JoinNode.INNERJOIN:
                                ton = (TableOperatorNode) nodeFactory.getNode(
                                                                        C_NodeTypes.JOIN_NODE,
                                                                        leftRSN,
                                                                        rightRSN,
                                                                        onClause,
                                                                        usingClause,
                                                                        null,
                                                                        null,
                                                                        null,
                                                                        getContextManager());
                                break;

                        case JoinNode.LEFTOUTERJOIN:
                                ton = (TableOperatorNode) nodeFactory.getNode(
                                                                                C_NodeTypes.HALF_OUTER_JOIN_NODE,
                                                                                leftRSN,
                                                                                rightRSN,
                                                                                onClause,
                                                                                usingClause,
                                                                                Boolean.FALSE,
                                                                                null,
                                                                                getContextManager());
                                break;

                        case JoinNode.RIGHTOUTERJOIN:
                                ton = (TableOperatorNode) nodeFactory.getNode(
                                                                                C_NodeTypes.HALF_OUTER_JOIN_NODE,
                                                                                leftRSN,
                                                                                rightRSN,
                                                                                onClause,
                                                                                usingClause,
                                                                                Boolean.TRUE,
                                                                                null,
                                                                                getContextManager());
                                break;


                        default:
                                if (SanityManager.DEBUG)
                                {
                                        SanityManager.ASSERT(false, "Unexpected joinType");
                                }
                                {if (true) return null;}
                }

                /* Mark whether or not we are nested within parens */
                ton.setNestedInParens(nestedInParens);
                {if (true) return ton;}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

/*
* <A NAME="tableReference">tableReference</A>
*/
  final public FromTable tableReference(boolean nestedInParens) throws ParseException, StandardException {
    FromTable fromTable;
    TableOperatorNode joinTable = null;
    fromTable = tableFactor();
    label_26:
    while (true) {
      if (joinedTableExpressionFollows()) {
        ;
View Full Code Here

                {if (true) return tableSubquery;}
    throw new Error("Missing return statement in function");
  }

  final public TableOperatorNode joinedTableExpression(ResultSetNode leftRSN, boolean nestedInParens) throws ParseException, StandardException {
        TableOperatorNode joinNode;
    switch (jj_nt.kind) {
    case CROSS:
      joinNode = crossJoin(leftRSN, nestedInParens);
                {if (true) return joinNode;}
      break;
View Full Code Here

  final public TableOperatorNode crossJoin(ResultSetNode leftRSN, boolean nestedInParens) throws ParseException, StandardException {
    ResultSetNode rightRSN;
    jj_consume_token(CROSS);
    jj_consume_token(JOIN);
    rightRSN = tableFactor();
        TableOperatorNode ton = newJoinNode(
                leftRSN,
                rightRSN,
                null, // no ON clause in CROSS JOIN
                null, // no USING clause in CROSS JOIN
                JoinNode.INNERJOIN);
        ton.setNestedInParens(nestedInParens);
        {if (true) return ton;}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

  }

  final public TableOperatorNode qualifiedJoin(ResultSetNode leftRSN, boolean nestedInParens) throws ParseException, StandardException {
        int                                     joinType = JoinNode.INNERJOIN;
        ResultSetNode           rightRSN;
        TableOperatorNode       ton = null;
        Object[]                        onOrUsingClause = null;
        ResultColumnList        usingClause = null;
        ValueNode                       onClause;
    switch (jj_nt.kind) {
    case INNER:
    case LEFT:
    case RIGHT:
      joinType = joinType();
      break;
    default:
      jj_la1[203] = jj_gen;
      ;
    }
    jj_consume_token(JOIN);
    rightRSN = tableReferenceTypes(nestedInParens);
    onOrUsingClause = joinSpecification(leftRSN, rightRSN);
                /* If NATURAL or CROSS is specified, then no joinSpecification()
     * is required, otherwise it is required. NATURAL and CROSS should
     * be handled by other rules, so this rule should always see a
     * joinSpecification().
     */

                /* Figure out whether an ON or USING clause was used */
                onClause = (ValueNode) onOrUsingClause[ON_CLAUSE];
                usingClause = (ResultColumnList) onOrUsingClause[USING_CLAUSE];

                if (onClause == null && usingClause == null)
                {
                        {if (true) throw StandardException.newException(SQLState.LANG_MISSING_JOIN_SPECIFICATION,
                                                        JoinNode.joinTypeToString(joinType));}
                }

                ton = newJoinNode(leftRSN, rightRSN, onClause, usingClause, joinType);

                /* Mark whether or not we are nested within parens */
                ton.setNestedInParens(nestedInParens);
                {if (true) return ton;}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

TOP

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

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.