Package org.tmatesoft.sqljet.core.table

Examples of org.tmatesoft.sqljet.core.table.SqlJetScope.reverse()


        return (ISqlJetCursor) db.runWithLock(new ISqlJetRunnableWithLock() {
            public Object runWithLock(SqlJetDb db) throws SqlJetException {
                final SqlJetBtreeDataTable table = new SqlJetBtreeDataTable(btree, tableName, write);
                checkIndexName(indexName, table);
                if (isNeedReverse(getIndexTable(indexName, table), adjustedScope)) {
                    return new SqlJetReverseOrderCursor(new SqlJetIndexScopeCursor(table, db, indexName, adjustedScope.reverse()));
                } else {
                    return new SqlJetIndexScopeCursor(table, db, indexName, adjustedScope);
                }
            }
        });
View Full Code Here


        assertIndexScope(outOfBoundsOpenScope);

        assertIndexScope(unbounded, "A", "ABC", "ABCD", "ABCDEF", "XYZ", "XYZZ" );
        assertIndexScope(unbounded.reverse(), "A", "ABC", "ABCD", "ABCDEF", "XYZ", "XYZZ" );
        assertIndexScope(unbounded2, "A", "ABC", "ABCD", "ABCDEF", "XYZ", "XYZZ" );
        assertIndexScope(unbounded2.reverse(), "A", "ABC", "ABCD", "ABCDEF", "XYZ", "XYZZ" );
    }

    @Test
    public void testNoIndexScope() throws SqlJetException {
        SqlJetScope closedScope = new SqlJetScope(new Object[] {2}, new Object[] {5});
View Full Code Here

        assertNoIndexScope(openScope, new Long(3), new Long(4));
        assertNoIndexScope(emptyScope);

        assertNoIndexScope(closedScope.reverse(), Long.valueOf(5),Long.valueOf(4),Long.valueOf(3), Long.valueOf(2));
        assertNoIndexScope(openScope.reverse(), new Long(4), new Long(3));
        assertNoIndexScope(emptyScope.reverse());
       
        db.runWriteTransaction(new ISqlJetTransaction() {
            public Object run(SqlJetDb db) throws SqlJetException {
                db.getTable("noindex").lookup(null, Long.valueOf(3)).delete();
                return null;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.