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

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


/*
* <A NAME="nonJoinQueryPrimary">nonJoinQueryPrimary</A>
*/
  final public ResultSetNode nonJoinQueryPrimary() throws ParseException, StandardException {
        ResultSetNode   primary;
    switch (jj_nt.kind) {
    case SELECT:
    case VALUES:
      primary = simpleTable();
                {if (true) return primary;}
View Full Code Here


/*
* <A NAME="simpleTable">simpleTable</A>
*/
  final public ResultSetNode simpleTable() throws ParseException, StandardException {
        ResultSetNode   resultSetNode;
    switch (jj_nt.kind) {
    case SELECT:
      resultSetNode = querySpecification();
                {if (true) return resultSetNode;}
      break;
View Full Code Here

/*
* <A NAME="insertColumnsAndSource">insertColumnsAndSource</A>
*/
  final public StatementNode insertColumnsAndSource(QueryTreeNode targetTable) throws ParseException, StandardException {
        Properties                      targetProperties = null;
        ResultSetNode   queryExpression;
        ResultColumnList        columnList = null;
        OrderByList orderCols = null;
    ValueNode offset = null;
    ValueNode fetchFirst = null;
    if (getToken(1).kind == LEFT_PAREN && ! subqueryFollows()) {
View Full Code Here

*/
  final public ResultSetNode rowValueConstructor(ResultSetNode leftRSN) throws ParseException, StandardException {
        ResultColumnList        resultColumns = (ResultColumnList) nodeFactory.getNode(
                                                                                                C_NodeTypes.RESULT_COLUMN_LIST,
                                                                                                getContextManager());
        ResultSetNode           newRSN;
    if (rowValueConstructorListFollows()) {
      jj_consume_token(LEFT_PAREN);
      rowValueConstructorList(resultColumns);
      jj_consume_token(RIGHT_PAREN);
                /* If leftRSN is null, simply return the newRSN, else generate and
     * return a UNION ALL above the 2 RSNs, after verifying that the size()
     * of both RSNs RCLs is the same.
     */
                newRSN = (ResultSetNode) nodeFactory.getNode(
                                                                C_NodeTypes.ROW_RESULT_SET_NODE,
                                                                resultColumns,
                                                                null,
                                                                getContextManager());
                if (leftRSN != null)
                {
                        if (leftRSN.getResultColumns().size() !=
                                newRSN.getResultColumns().size())
                        {
                                {if (true) throw StandardException.newException(SQLState.LANG_ROW_VALUE_CONSTRUCTOR_UNMATCHED_COLUMNS);}
                        }

                        newRSN = (ResultSetNode) nodeFactory.getNode(
                                                                        C_NodeTypes.UNION_NODE,
                                                                        leftRSN,
                                                                        newRSN,
                                                                        Boolean.TRUE,
                                                                        Boolean.TRUE,
                                                                        null,
                                                                        getContextManager());
                }
                {if (true) return newRSN;}
    } else {
      rowValueConstructorElement(resultColumns);
                /* If leftRSN is null, simply return the newRSN, else generate and
     * return a UNION ALL above the 2 RSNs, after verifying that the size()
     * of both RSNs RCLs is the same.
     */
                newRSN = (ResultSetNode) nodeFactory.getNode(
                                                                C_NodeTypes.ROW_RESULT_SET_NODE,
                                                                resultColumns,
                                                                null,
                                                                getContextManager());
                if (leftRSN != null)
                {
                        if (leftRSN.getResultColumns().size() !=
                                newRSN.getResultColumns().size())
                        {
                                {if (true) throw StandardException.newException(SQLState.LANG_ROW_VALUE_CONSTRUCTOR_UNMATCHED_COLUMNS);}
                        }

                        newRSN = (ResultSetNode) nodeFactory.getNode(
View Full Code Here

/*
* <A NAME="subquery">subquery</A>
*/
  final public SubqueryNode subquery(int subqueryType, ValueNode leftOperand) throws ParseException, StandardException {
        ResultSetNode   queryExpression;
        SubqueryNode    subqueryNode;
        OrderByList orderCols = null;
    ValueNode offset = null;
    ValueNode fetchFirst = null;
    queryExpression = queryExpression(null, NO_SET_OP);
View Full Code Here

    }
    throw new Error("Missing return statement in function");
  }

  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,
View Full Code Here

    throw new Error("Missing return statement in function");
  }

  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) {
View Full Code Here

    throw new Error("Missing return statement in function");
  }

  final public TableOperatorNode naturalJoin(ResultSetNode leftRSN, boolean nestedInParens) throws ParseException, StandardException {
    int joinType = JoinNode.INNERJOIN;
    ResultSetNode rightRSN;
    jj_consume_token(NATURAL);
    switch (jj_nt.kind) {
    case INNER:
    case LEFT:
    case RIGHT:
View Full Code Here

/*
* <A NAME="tableValueConstructor">tableValueConstructor</A>
*/
  final public ResultSetNode tableValueConstructor() throws ParseException, StandardException {
        ResultSetNode   resultSetNode;
    jj_consume_token(VALUES);
    resultSetNode = tableValueConstructorList();
                {if (true) return resultSetNode;}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

/*
* <A NAME="tableValueConstructorList">tableValueConstructorList</A>
*/
  final public ResultSetNode tableValueConstructorList() throws ParseException, StandardException {
        ResultSetNode   resultSetNode;
    resultSetNode = rowValueConstructor(null);
    label_29:
    while (true) {
      switch (jj_nt.kind) {
      case COMMA:
View Full Code Here

TOP

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

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.