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

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


* which is not the same as
*   t1 INTERSECT (t2 INTERSECT ALL t3)
* See the comment on queryExpression.
*/
  final public ResultSetNode nonJoinQueryTerm(ResultSetNode leftSide, int operatorType) throws ParseException, StandardException {
        ResultSetNode   term;
    term = nonJoinQueryPrimary();
    switch (jj_nt.kind) {
    case INTERSECT:
      term = intersect(term);
      break;
View Full Code Here


/*
* <A NAME="intersect">intersect</A>
*/
  final public ResultSetNode intersect(ResultSetNode term) throws ParseException, StandardException {
        ResultSetNode   expression;
        Token                   tok = null;
    jj_consume_token(INTERSECT);
    switch (jj_nt.kind) {
    case ALL:
    case DISTINCT:
View Full Code Here

/*
* <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 QueryTreeNode insertColumnsAndSource(QueryTreeNode targetTable) throws ParseException, StandardException {
        Properties                      targetProperties = null;
        ResultSetNode   queryExpression;
        ResultColumnList        columnList = null;
    if (getToken(1).kind == LEFT_PAREN && ! subqueryFollows()) {
      jj_consume_token(LEFT_PAREN);
      columnList = insertColumnList();
      jj_consume_token(RIGHT_PAREN);
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;
    queryExpression = queryExpression(null, NO_SET_OP);
                subqueryNode = (SubqueryNode) nodeFactory.getNode(
                                                                                C_NodeTypes.SUBQUERY_NODE,
                                                                                queryExpression,
View Full Code Here

        FromTable                       fromTable;
        TableOperatorNode       joinTable = null;
        FromTable                       tableReference;
        Object[]                        optionalTableClauses = new Object[OPTIONAL_TABLE_CLAUSES_SIZE];
        Properties                      tableProperties = null;
        ResultSetNode           derivedTable;
    if (newInvocationFollows(1)) {
      javaToSQLNode = newInvocation();
      switch (jj_nt.kind) {
      case AS:
        jj_consume_token(AS);
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

/*
* <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

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.