Package com.akiban.sql

Examples of com.akiban.sql.StandardException


            if (retval > 0)
                {if (true) return retval;}
        }
        catch (NumberFormatException nfe) {
        }
        {if (true) throw new StandardException("Invalid column length: " + tok.image);}
    throw new Error("Missing return statement in function");
  }
View Full Code Here


    longToken = jj_consume_token(EXACT_NUMERIC);
        try {
            {if (true) return Long.parseLong(getNumericString(longToken, sign));}
        }
        catch (NumberFormatException nfe) {
            {if (true) throw new StandardException("Invalid integer: " + longToken.image, nfe);}
        }
    throw new Error("Missing return statement in function");
  }
View Full Code Here

        uintToken = jj_consume_token(EXACT_NUMERIC);
        try {
            {if (true) return Integer.parseInt(uintToken.image);}
        }
        catch (NumberFormatException nfe) {
            {if (true) throw new StandardException("Invalid integer: " + uintToken.image, nfe);}
        }
    throw new Error("Missing return statement in function");
  }
View Full Code Here

        ** ? parameters are not allowed for the receiver --
        ** unless the receiver is standing in for a named parameter,
        ** whose type is therefore known.
        */
        if (receiver instanceof ParameterNode) {
            {if (true) throw new StandardException("Parameter not allowed for method receiver");}
        }
        methodNode.addParms(parameterList);

        /*
        ** Assume this is being returned to the SQL domain.  If it turns
        ** out that this is being returned to the Java domain, we will
        ** get rid of this node.
        */
        {if (true) return (ValueNode)nodeFactory.getNode(NodeTypes.JAVA_TO_SQL_VALUE_NODE,
                                              methodNode,
                                              parserContext);}
    } else {
      switch (jj_nt.kind) {
      case PERIOD:
        jj_consume_token(PERIOD);
        methodNode = methodName(receiver);
        /*
        ** ? parameters are not allowed for the receiver --
        ** unless the receiver is standing in for a named parameter,
        ** whose type is therefore known.
        */
        if (receiver instanceof ParameterNode) {
            {if (true) throw new StandardException("Parameter not allowed for method receiver");}
        }

        methodNode.addParms(parameterList);

        /*
 
View Full Code Here

/*
* For now, we only support the PRESERVE WHITESPACE option.
*/
  final public boolean xmlPreserveWhitespace() throws ParseException, StandardException {
    if ((getToken(1).kind != STRIP) || (getToken(1).kind != PRESERVE)) {
        {if (true) throw new StandardException("Missing required PRESERVE WHITESPACE");}
    } else {
      switch (jj_nt.kind) {
      case STRIP:
        jj_consume_token(STRIP);
        jj_consume_token(WHITESPACE);
View Full Code Here

* Parse the target type of an XMLSERIALIZE operation.
*/
  final public DataTypeDescriptor xmlSerializeTargetType() throws ParseException, StandardException {
    DataTypeDescriptor targetType;
    if ((getToken(1).kind != AS)) {
        {if (true) throw new StandardException("Missing required AS");}
    } else {
      switch (jj_nt.kind) {
      case AS:
        jj_consume_token(AS);
        targetType = dataTypeDDL();
View Full Code Here

             * there's no point in letting the user specify variables
             * right now.    So we disallow it.  In the future we'll have
             * to add logic here to store the variables and pass them
             * to the correct operator for binding/execution.
             */
            {if (true) throw new StandardException("Not implemented yet: PASSING ... AS");}
    } else {
      ;
    }
    if (jj_2_54(1)) {
      passingMech = xmlPassingMechanism();
    } else {
      ;
    }
            if (varName == null) {
                /* We get here if we just parsed an XML context item.
                 * That said, if we already have one (xmlVal[0] is not
                 * null) then we can't allow second one, per SQL/XML[2006]
                 * (6.17: Syntax Rules:5.b.i): "XMQ shall contain exactly
                 * one <XML query context item> XQCI."
                 */
                if (xmlVal[0] != null) {
                    {if (true) throw new StandardException("Multiple XML context items");}
                }

                xmlVal[0] = curVal;

                /* Note: It's possible that a passing mechanism was
View Full Code Here

    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

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.