Package org.hsqldb_voltpatches.lib

Examples of org.hsqldb_voltpatches.lib.HashMappedList


            return oldRows.getSize();
        }

        HashSet path = session.sessionContext.getConstraintPath();
        HashMappedList tableUpdateList =
            session.sessionContext.getTableUpdateList();

        if (session.database.isReferentialIntegrity()) {
            oldRows.beforeFirst();

            while (oldRows.hasNext()) {
                oldRows.next();

                Row row = oldRows.getCurrentRow();

                path.clear();
                checkCascadeDelete(session, table, tableUpdateList, row,
                                   false, path);
            }
        }

        if (session.database.isReferentialIntegrity()) {
            oldRows.beforeFirst();

            while (oldRows.hasNext()) {
                oldRows.next();

                Row row = oldRows.getCurrentRow();

                path.clear();
                checkCascadeDelete(session, table, tableUpdateList, row, true,
                                   path);
            }
        }

        oldRows.beforeFirst();

        while (oldRows.hasNext()) {
            oldRows.next();

            Row row = oldRows.getCurrentRow();

            if (!row.isDeleted(session)) {
                table.deleteNoRefCheck(session, row);
            }
        }

        for (int i = 0; i < tableUpdateList.size(); i++) {
            Table targetTable = (Table) tableUpdateList.getKey(i);
            HashMappedList updateList =
                (HashMappedList) tableUpdateList.get(i);

            if (updateList.size() > 0) {
                targetTable.updateRowSet(session, updateList, null, true);
                updateList.clear();
            }
        }

        oldRows.beforeFirst();
View Full Code Here


                                   || c.getDeleteAction()
                                      == Constraint.SET_DEFAULT;

                // -- list for records to be inserted if this is
                // -- a 'ON DELETE SET [NULL|DEFAULT]' constraint
                HashMappedList rowSet = null;

                if (isUpdate) {
                    rowSet = (HashMappedList) tableUpdateList.get(reftable);

                    if (rowSet == null) {
                        rowSet = new HashMappedList();

                        tableUpdateList.add(reftable, rowSet);
                    }
                }
View Full Code Here

            boolean hasref =
                reftable.getNextConstraintIndex(0, Constraint.MAIN) != -1;
            Index refindex = c.getRefIndex();

            // -- walk the index for all the nodes that reference update node
            HashMappedList rowSet =
                (HashMappedList) tableUpdateLists.get(reftable);

            if (rowSet == null) {
                rowSet = new HashMappedList();

                tableUpdateLists.add(reftable, rowSet);
            }

            for (Row refrow = refiterator.getNextRow(); ;
View Full Code Here

            }

            return;
        }

        HashMappedList list = new HashMappedList();

        if (parent != null) {
            for (int i = 0; i < parent.scopeVariables.size(); i++) {
                list.add(parent.scopeVariables.getKey(i),
                         parent.scopeVariables.get(i));
            }
        }

        for (int i = 0; i < variables.length; i++) {
            String  name  = variables[i].getName().name;
            boolean added = list.add(name, variables[i]);

            if (!added) {
                throw Error.error(ErrorCode.X_42606, name);
            }

            if (root.getParameterIndex(name) != -1) {
                throw Error.error(ErrorCode.X_42606, name);
            }
        }

        RangeVariable range = new RangeVariable(list, true);

        rangeVariables     = new RangeVariable[] {
            root.getParameterRangeVariables()[0], range
        };
        root.variableCount = list.size();
    }
View Full Code Here

            ex.printStackTrace();
        }
    }

    public static HashMappedList getHashMappedList() {
        return new HashMappedList();
    }
View Full Code Here

TOP

Related Classes of org.hsqldb_voltpatches.lib.HashMappedList

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.