Package com.foundationdb.sql

Examples of com.foundationdb.sql.StandardException


    public void applyFunction(Object functionType,
                              int firstArgumentPosition,
                              int nArguments) throws StandardException
    {
        if (functionApplication != null) {
            throw new StandardException("Cannot use multiple functions in one index definition");
        }
        functionApplication = new FunctionApplication((FunctionType) functionType,
                                                      firstArgumentPosition,
                                                      nArguments);
    }
View Full Code Here


                        String[] dupNameCheck = new String[paramCount];
                        System.arraycopy(names, 0, dupNameCheck, 0, paramCount);
                        java.util.Arrays.sort(dupNameCheck);
                        for (int dnc = 1; dnc < dupNameCheck.length; dnc++) {
                            if (! dupNameCheck[dnc].equals("") && dupNameCheck[dnc].equals(dupNameCheck[dnc - 1]))
                                throw new StandardException("Duplicate parameter name");
                        }
                    }
                }

                Integer drso = (Integer)routineElements[DYNAMIC_RESULT_SET_COUNT];
View Full Code Here

            try {
                nodeClass = Class.forName(nodeName);
            }
            catch (ClassNotFoundException cnfe) {
                throw new StandardException(cnfe);
            }

            ci = new ClassInfo(nodeClass);
            nodeCi[nodeType] = ci;
        }

        QueryTreeNode retval = null;

        try {
            retval = (QueryTreeNode)ci.getNewInstance();
        }
        catch (Exception iae) {
            throw new StandardException(iae);
        }

        retval.setParserContext(pc);
        retval.setNodeType(nodeType);
View Full Code Here

        case NodeTypes.SET_CONSTRAINTS_NODE:
            return NodeNames.SET_CONSTRAINTS_NODE_NAME;

        default:
            throw new StandardException("Not implemented");
        }
    }
View Full Code Here

            return ta1;
        }
        else if (ta1.collationDerivation == CollationDerivation.EXPLICIT) {
            if (ta2.collationDerivation == CollationDerivation.EXPLICIT) {
                if (!ta1.collation.equals(ta2.collation))
                    throw new StandardException("Incompatible collations: " +
                                                ta1 + " " + ta1.collation + " and " +
                                                ta2 + " " + ta2.collation);
            }
            return ta1;
        }
View Full Code Here

                }
            }
        else {
            /* At least 1 type is not a system built-in type */
            if (!thisType.equals(otherType)) {
                throw new StandardException("Two different user-defined types");
            }
            higherType = this;
            precision = higherType.getPrecision();
            scale = higherType.getScale();
        }
View Full Code Here

        else if (typeId == TypeId.DECIMAL_ID)
            unsignedTypeId = TypeId.DECIMAL_UNSIGNED_ID;
        else if (typeId == TypeId.NUMERIC_ID)
            unsignedTypeId = TypeId.NUMERIC_UNSIGNED_ID;
        else
            throw new StandardException("Not a numeric type: " + this);           
        return new DataTypeDescriptor(unsignedTypeId, precision, scale,
                                      isNullable, maximumWidth);
    }
View Full Code Here

        }
        if (startField == INTERVAL_MINUTE_ID) {
            if (endField == INTERVAL_SECOND_ID)
                return INTERVAL_MINUTE_SECOND_ID;
        }
        throw new StandardException("Illegal " + startField.unqualifiedName +
                                    " TO " + endField.unqualifiedName.substring("INTERVAL ".length()));
    }
View Full Code Here

    }

    public ViewDefinition(StatementNode parsed, SQLParserContext parserContext)
            throws StandardException {
        if (parsed.getNodeType() != NodeTypes.CREATE_VIEW_NODE) {
            throw new StandardException("Parsed statement was not a view");
        }
        definition = (CreateViewNode)parsed;
        subquery = (FromSubquery)
            parserContext.getNodeFactory().getNode(NodeTypes.FROM_SUBQUERY,
                                                   definition.getParsedQueryExpression(),
View Full Code Here

        TypeId leftTypeId = leftType.getTypeId();
        TypeId rightTypeId = rightType.getTypeId();
        if (leftTypeId.equals(rightTypeId))
            return leftType;

        throw new StandardException("Types not compatible for " + operator +
                                    ": " + leftTypeId.getSQLTypeName() +
                                    " and " + rightTypeId.getSQLTypeName());
    }
View Full Code Here

TOP

Related Classes of com.foundationdb.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.