Package com.akiban.sql

Examples of com.akiban.sql.StandardException


        TableName tempTableName = (TableName)objectName;
        if (tempTableName != null) {
            if (tempTableName.getSchemaName() == null)
                tempTableName.setSchemaName("SESSION"); //If no schema specified, SESSION is the implicit schema.
            else if (!"SESSION".equals(tempTableName.getSchemaName()))
                throw new StandardException("Must specify SESSION schema");
        }
        return(tempTableName);
    }
View Full Code Here


*
*/
  final public void xmlDocOrContent() throws ParseException, StandardException {
    if ((getToken(1).kind != DOCUMENT) && (getToken(1).kind != CONTENT)) {
        // TODO: Is this needed?
        {if (true) throw new StandardException("Not DOCUMENT or CONTENT");}
    } else if (getToken(1).kind == CONTENT) {
      jj_consume_token(CONTENT);
        // TODO: Fix this by returning a proper value.
        {if (true) throw new StandardException("CONTENT not supported yet");}
    } else if (getToken(1).kind == DOCUMENT) {
      jj_consume_token(DOCUMENT);
        {if (true) return;}
    } else {
      jj_consume_token(-1);
View Full Code Here

                {if (true) return (int)specifiedLength;}
            }
        }
        catch (NumberFormatException nfe) {
        }
        {if (true) throw new StandardException("Invalid LOB length:" + s);}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

            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

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.