Package org.hsqldb

Examples of org.hsqldb.Row


                x = l;
                l = x.getRight(store);
            }

            while (session != null && x != null) {
                Row row = x.getRow(store);

                if (session.database.txManager.canRead(
                        session, row, TransactionManager.ACTION_READ, null)) {
                    break;
                }
View Full Code Here


            if (session == null) {
                return x;
            }

            Row row = x.getRow(store);

            if (session.database.txManager.canRead(
                    session, row, TransactionManager.ACTION_READ, null)) {
                return x;
            }
View Full Code Here

            if (session == null) {
                return x;
            }

            Row row = x.getRow(store);

            if (session.database.txManager.canRead(
                    session, row, TransactionManager.ACTION_READ, null)) {
                return x;
            }
View Full Code Here

            }

            nodeData = c.getData(store);

            if (compareRow(session, data, nodeData) == 0) {
                Row row = c.getRow(store);

                if (session.database.txManager.canRead(
                        session, row, TransactionManager.ACTION_DUP, null)) {
                    return true;
                }

                continue;
            }

            break;
        }

        while (true) {
            c = next(session, store, node, 0);

            if (c == null) {
                break;
            }

            nodeData = c.getData(store);

            if (compareRow(session, data, nodeData) == 0) {
                Row row = c.getRow(store);

                if (session.database.txManager.canRead(
                        session, row, TransactionManager.ACTION_DUP, null)) {
                    return true;
                }
View Full Code Here

        try {
            NodeAVL x          = getAccessor(store);
            NodeAVL n          = null;
            NodeAVL result     = null;
            Row     currentRow = null;

            if (compareType != OpTypes.EQUAL
                    && compareType != OpTypes.IS_NULL) {
                fieldCount--;
            }

            while (x != null) {
                currentRow = x.getRow(store);

                int i = 0;

                if (fieldCount > 0) {
                    i = compareRowNonUnique(session, currentRow.getData(),
                                            rowdata, rowColMap, fieldCount);
                }

                if (i == 0) {
                    switch (compareType) {

                        case OpTypes.IS_NULL :
                        case OpTypes.EQUAL : {
                            result = x;
                            n      = x.getLeft(store);

                            break;
                        }
                        case OpTypes.NOT :
                        case OpTypes.GREATER : {
                            i = compareObject(session, currentRow.getData(),
                                              rowdata, rowColMap, fieldCount);

                            if (i <= 0) {
                                n = x.getRight(store);
                            } else {
                                result = x;
                                n      = x.getLeft(store);
                            }

                            break;
                        }
                        case OpTypes.GREATER_EQUAL : {
                            i = compareObject(session, currentRow.getData(),
                                              rowdata, rowColMap, fieldCount);

                            if (i < 0) {
                                n = x.getRight(store);
                            } else {
                                result = x;
                                n      = x.getLeft(store);
                            }

                            break;
                        }
                        case OpTypes.SMALLER : {
                            i = compareObject(session, currentRow.getData(),
                                              rowdata, rowColMap, fieldCount);

                            if (i < 0) {
                                result = x;
                                n      = x.getRight(store);
                            } else {
                                n = x.getLeft(store);
                            }

                            break;
                        }
                        case OpTypes.SMALLER_EQUAL : {
                            i = compareObject(session, currentRow.getData(),
                                              rowdata, rowColMap, fieldCount);

                            if (i <= 0) {
                                result = x;
                                n      = x.getRight(store);
                            } else {
                                n = x.getLeft(store);
                            }

                            break;
                        }
                        default :
                            Error.runtimeError(ErrorCode.U_S0500, "Index");
                    }
                } else if (i < 0) {
                    n = x.getRight(store);
                } else if (i > 0) {
                    n = x.getLeft(store);
                }

                if (n == null) {
                    break;
                }

                x = n;
            }

            // MVCC 190
            if (session == null) {
                return result;
            }

            while (result != null) {
                currentRow = result.getRow(store);

                if (session.database.txManager.canRead(session, currentRow,
                                                       readMode, colIndex)) {
                    break;
                }

                result = reversed ? last(store, result)
                                  : next(store, result);

                if (result == null) {
                    break;
                }

                currentRow = result.getRow(store);

                if (fieldCount > 0
                        && compareRowNonUnique(
                            session, currentRow.getData(), rowdata, rowColMap,
                            fieldCount) != 0) {
                    result = null;

                    break;
                }
View Full Code Here

        try {
            NodeAVL x          = getAccessor(store);
            NodeAVL n          = null;
            NodeAVL result     = null;
            Row     currentRow = null;

            while (x != null) {
                currentRow = x.getRow(store);

                int i = colTypes[0].compare(session, data,
                                            currentRow.getData()[colIndex[0]]);

                switch (compareType) {

                    case OpTypes.IS_NULL :
                    case OpTypes.EQUAL : {
                        if (i == 0) {
                            result = x;
                            n      = x.getLeft(store);

                            break;
                        } else if (i > 0) {
                            n = x.getRight(store);
                        } else if (i < 0) {
                            n = x.getLeft(store);
                        }

                        break;
                    }
                    case OpTypes.NOT :
                    case OpTypes.GREATER : {
                        if (i >= 0) {
                            n = x.getRight(store);
                        } else {
                            result = x;
                            n      = x.getLeft(store);
                        }

                        break;
                    }
                    case OpTypes.GREATER_EQUAL : {
                        if (i > 0) {
                            n = x.getRight(store);
                        } else {
                            result = x;
                            n      = x.getLeft(store);
                        }

                        break;
                    }
                    default :
                        Error.runtimeError(ErrorCode.U_S0500, "Index");
                }

                if (n == null) {
                    break;
                }

                x = n;
            }

            // MVCC 190
            if (session == null) {
                return result;
            }

            while (result != null) {
                currentRow = result.getRow(store);

                if (session.database.txManager.canRead(session, currentRow,
                                                       readMode, colIndex)) {
                    break;
                }

                result = next(store, result);

                if (compareType == OpTypes.EQUAL) {
                    if (colTypes[0].compare(
                            session, data,
                            currentRow.getData()[colIndex[0]]) != 0) {
                        result = null;

                        break;
                    }
                }
View Full Code Here

            return lastrow;
        }

        public Object[] getNext() {

            Row row = getNextRow();

            return row == null ? null
                               : row.getData();
        }
View Full Code Here

        return cache.getAccessCount();
    }

    public void set(CachedObject object) {

        Row row = ((Row) object);

        database.txManager.setTransactionInfo(row);
    }
View Full Code Here

    }

    public CachedObject getNewCachedObject(Session session, Object object,
                                           boolean tx) {

        Row row = new RowAVLDisk(table, (Object[]) object, this);

        add(row);

        if (tx) {
            RowAction action = new RowAction(session, table,
View Full Code Here

                        RowIterator it =
                            t.rowIteratorClustered(currentSession);

                        while (it.hasNext()) {
                            Row row = it.getNextRow();

                            writeRow(currentSession, row, t);
                        }

                        writeTableTerm(t);
View Full Code Here

TOP

Related Classes of org.hsqldb.Row

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.