Package com.foundationdb.sql

Examples of com.foundationdb.sql.StandardException


            throws StandardException {
        ValueNode operand = node.getOperand();
        DataTypeDescriptor origType = operand.getType();
        if (origType != null) {
            if (!origType.getTypeId().isStringTypeId())
                throw new StandardException("Collation not allowed for " + origType);
            CharacterTypeAttributes characterAttributes =
                CharacterTypeAttributes.forCollation(origType.getCharacterAttributes(),
                                                     node.getCollation());
            operand.setType(new DataTypeDescriptor(origType, characterAttributes));
        }
View Full Code Here


            if (type == null) {
                assert false : "Type not set yet";
                return;
            }
            if (!type.getTypeId().isBooleanTypeId())
                throw new StandardException("Non-boolean " + which + " clause");
        }
    }
View Full Code Here

            for (Column column : table.getColumns()) {
                ColumnBinding prev = bindings.put(column.getName(),
                                                  new ColumnBinding(fromTable, column,
                                                                    tableBinding.isNullable()));
                if (prev != null)
                    throw new StandardException("Duplicate column name " + column.getName() + " not allowed with NATURAL JOIN");
            }
        }
        else if (fromTable instanceof FromSubquery) {
            FromSubquery fromSubquery = (FromSubquery)fromTable;
            for (ResultColumn resultColumn : fromSubquery.getResultColumns()) {
                ColumnBinding prev = bindings.put(resultColumn.getName(),
                                                  new ColumnBinding(fromTable, resultColumn));
                if (prev != null)
                    throw new StandardException("Duplicate column name " + resultColumn.getName() + " not allowed with NATURAL JOIN");
            }
        }
        else if (fromTable instanceof JoinNode) {
            JoinNode joinNode = (JoinNode)fromTable;
            getUniqueColumnBindings((FromTable)joinNode.getLeftResultSet(), bindings);
View Full Code Here

            case NodeTypes.UPDATE_NODE:
                return toUpdateStatement((UpdateNode)stmt);
            case NodeTypes.INSERT_NODE:
                return toInsertStatement((InsertNode)stmt);
            default:
                throw new StandardException("Unsupported statement type: " +
                                            stmt.statementToString());
            }
        }
View Full Code Here

            case NodeTypes.UPDATE_NODE:
            case NodeTypes.INSERT_NODE:
                return generateUpdate();
            default:
                throw new SQLParserInternalException(
                        new StandardException("Unsupported statement type: " + stmt.statementToString())
                );
        }
    }
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.