Package com.foundationdb.server.error

Examples of com.foundationdb.server.error.InsertWrongCountException


            ResultColumnList rcl = insertNode.getTargetColumnList();
            int ncols = insertNode.getResultSetNode().getResultColumns().size();
            List<Column> targetColumns;
            if (rcl != null) {
                if (ncols != rcl.size())
                    throw new InsertWrongCountException(rcl.size(), ncols);
                targetColumns = new ArrayList<>(rcl.size());
                for (ResultColumn resultColumn : rcl) {
                    Column column = getColumnReferenceColumn(resultColumn.getReference(),
                                                             "Unsupported target column");
                    targetColumns.add(column);
                }
            }
            else {
                // No explicit column list: use DDL order.
                List<Column> aisColumns = targetTable.getTable().getColumns();
                if (ncols > aisColumns.size())
                    throw new InsertWrongCountException(aisColumns.size(), ncols);
                targetColumns = new ArrayList<>(ncols);
                for (int i = 0; i < ncols; i++) {
                    targetColumns.add(aisColumns.get(i));
                }
            }
View Full Code Here

TOP

Related Classes of com.foundationdb.server.error.InsertWrongCountException

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.