Package com.akiban.sql

Examples of com.akiban.sql.StandardException


    ValueNode value;
    switch (jj_nt.kind) {
    case OFFSET:
      value = offsetClause();
        if (offsetAndFetchFirst[0] != null)
            {if (true) throw new StandardException("OFFSET specified more than one");}
        offsetAndFetchFirst[0] = value;
      break;
    case FETCH:
      value = fetchFirstClause();
        if (offsetAndFetchFirst[1] != null)
            {if (true) throw new StandardException("FETCH FIRST specified more than one");}
        offsetAndFetchFirst[1] = value;
      break;
    case LIMIT:
      limitClause(offsetAndFetchFirst);
      break;
View Full Code Here


      }
    } else {
      ;
    }
        if (offsetAndFetchFirst[1] != null)
            {if (true) throw new StandardException("LIMIT specified more than one");}
        if (v2 == null)
            offsetAndFetchFirst[1] = v1;
        else {
            if (offsetAndFetchFirst[0] != null)
                {if (true) throw new StandardException("LIMIT offset specified more than one");}
            if (tok.kind == OFFSET) {
                offsetAndFetchFirst[0] = v2;
                offsetAndFetchFirst[1] = v1;
            }
            else {
View Full Code Here

            // Not allowed by the standard since this is a <contextually typed
            // table value constructor> according SQL 2008, vol2, section 14.11
            // "<insert statement>, SR 17. (I.e. it is not a <subquery> and
            // can't have an ORDER BY).

            {if (true) throw new StandardException("ORDER BY not allowed");}
        }

        if ((offsetAndFetchFirst[0] != null || offsetAndFetchFirst[1] != null) &&
                isTableValueConstructor(queryExpression)) {
            {if (true) throw new StandardException("Not allowed: " +
                                         ((offsetAndFetchFirst[0] != null) ? "OFFSET" : "FETCH"));}
        }

        {if (true) return (StatementNode)nodeFactory.getNode(NodeTypes.INSERT_NODE,
                                                  targetTable,
View Full Code Here

        if (leftRSN == null)
            {if (true) return newRSN;}

        if (leftRSN.getResultColumns().size() !=
            newRSN.getResultColumns().size()) {
            {if (true) throw new StandardException("Row value size is different");}
        }

        RowsResultSetNode rows;
        if (leftRSN instanceof RowsResultSetNode)
            rows = (RowsResultSetNode)leftRSN;
View Full Code Here

                                                                  null, parserContext),
                                              parserContext));
        break;
      default:
        jj_la1[214] = jj_gen;
        {if (true) throw new StandardException("VALUES is empty");}
      }
    }
  }
View Full Code Here

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

        if (onClause == null && usingClause == null) {
            {if (true) throw new StandardException("Missing JOIN specification");}
        }

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

        /* Mark whether or not we are nested within parens */
 
View Full Code Here

    List<ValueNode> paramList= new ArrayList<ValueNode>();
    colsList(paramList);
        switch(paramList.size())
        {
            case 0:
                {if (true) throw new StandardException("GROUP_CONCAT must have at least one argument");}
            case 1:
                {if (true) return paramList.get(0);}
            default:
                newNode = nodeFactory.getNode(NodeTypes.NEW_INVOCATION_NODE,
                                              "concat",
View Full Code Here

    columnExpression = additiveExpression();
        /* Aggregates not allowed in group by */
        HasNodeVisitor visitor = new HasNodeVisitor(AggregateNode.class);
        columnExpression.accept(visitor);
        if (visitor.hasNode()) {
            {if (true) throw new StandardException("Aggregate values not allowed in GROUP BY");}
        }

        if (columnExpression.isParameterNode()) {
            {if (true) throw new StandardException("Parameters not allowed in GROUP BY");}
        }
        groupingCols.addGroupByColumn(
            (GroupByColumn)nodeFactory.getNode(NodeTypes.GROUP_BY_COLUMN,
                                               columnExpression,
                                               parserContext));
View Full Code Here

        }
      }
    }
        if (optionIndex != -1) {
            if (optionalClauses[optionIndex] != null) {
                {if (true) throw new StandardException("Repeated SEQUENCE clause");}
            }
            optionalClauses[ optionIndex ] = option;
        }
  }
View Full Code Here

        /* Parameters not allowed in create table */
        HasNodeVisitor visitor =
            new HasNodeVisitor(ParameterNode.class);
        queryExpression.accept(visitor);
        if (visitor.hasNode()) {
            {if (true) throw new StandardException("Parameters not allowed in CREATE TABLE");}
        }

        StatementNode result = (StatementNode)nodeFactory.getNode(NodeTypes.CREATE_TABLE_NODE,
                                                                  tableName,
                                                                  resultColumns,
View Full Code Here

TOP

Related Classes of com.akiban.sql.StandardException

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.