Package org.tmatesoft.sqljet.core.table

Examples of org.tmatesoft.sqljet.core.table.ISqlJetCursor.eof()


        db.runReadTransaction(new ISqlJetTransaction() {
            public Object run(SqlJetDb db) throws SqlJetException {
                ISqlJetCursor open = table.open();
                try {
                    while (!open.eof()) {
                        long id = open.getInteger("id");
                        Assert.assertNotNull(id);
                        open.next();
                    }
                } finally {
View Full Code Here


                cursor = db.getTable("table").scope("names_idx", scope);
                // now at 0.
               
                count = cursor.getRowCount();
                Assert.assertTrue(count > 0);
                Assert.assertTrue(!cursor.eof());
                Assert.assertTrue(cursor.getRowCount() > 0);
                Assert.assertTrue(!cursor.eof());
               
                Assert.assertTrue(cursor.next());
                // now at 1.
View Full Code Here

               
                count = cursor.getRowCount();
                Assert.assertTrue(count > 0);
                Assert.assertTrue(!cursor.eof());
                Assert.assertTrue(cursor.getRowCount() > 0);
                Assert.assertTrue(!cursor.eof());
               
                Assert.assertTrue(cursor.next());
                // now at 1.
                Assert.assertFalse(cursor.eof());
                Assert.assertTrue(cursor.getRowCount() == 3);
View Full Code Here

                Assert.assertTrue(cursor.getRowCount() > 0);
                Assert.assertTrue(!cursor.eof());
               
                Assert.assertTrue(cursor.next());
                // now at 1.
                Assert.assertFalse(cursor.eof());
                Assert.assertTrue(cursor.getRowCount() == 3);
                Assert.assertTrue(cursor.next());
               
                // now at 2.
                Assert.assertFalse(cursor.eof());
View Full Code Here

                Assert.assertFalse(cursor.eof());
                Assert.assertTrue(cursor.getRowCount() == 3);
                Assert.assertTrue(cursor.next());
               
                // now at 2.
                Assert.assertFalse(cursor.eof());
                Assert.assertFalse(cursor.eof());
                Assert.assertTrue(cursor.getRowCount() == 3);
                Assert.assertFalse(cursor.next());
                // now at eof
                Assert.assertTrue(cursor.eof());
View Full Code Here

                Assert.assertTrue(cursor.getRowCount() == 3);
                Assert.assertTrue(cursor.next());
               
                // now at 2.
                Assert.assertFalse(cursor.eof());
                Assert.assertFalse(cursor.eof());
                Assert.assertTrue(cursor.getRowCount() == 3);
                Assert.assertFalse(cursor.next());
                // now at eof
                Assert.assertTrue(cursor.eof());
View Full Code Here

                Assert.assertFalse(cursor.eof());
                Assert.assertFalse(cursor.eof());
                Assert.assertTrue(cursor.getRowCount() == 3);
                Assert.assertFalse(cursor.next());
                // now at eof
                Assert.assertTrue(cursor.eof());

                Assert.assertTrue(cursor.previous());
                // at 2.
                Assert.assertTrue(cursor.getRowCount() == 3);
                Assert.assertFalse(cursor.eof());
View Full Code Here

                    new Object[] { Long.valueOf(20) });
            assertEquals(11, cursor.getRowCount());
            ISqlJetCursor reversed = cursor.reverse();
            assertEquals(11, reversed.getRowCount());
            List<Long> list = new LinkedList<Long>();
            if (!reversed.eof()) {
                do {
                    list.add(reversed.getInteger(0));
                } while (reversed.next());
            }
            assertEquals(11, list.size());
View Full Code Here

                Assert.assertTrue(cursor.eof());

                Assert.assertTrue(cursor.previous());
                // at 2.
                Assert.assertTrue(cursor.getRowCount() == 3);
                Assert.assertFalse(cursor.eof());

                Assert.assertTrue(cursor.previous());
                // at 1.
                Assert.assertTrue(cursor.getRowCount() == 3);
                Assert.assertFalse(cursor.eof());
View Full Code Here

                Assert.assertFalse(cursor.eof());

                Assert.assertTrue(cursor.previous());
                // at 1.
                Assert.assertTrue(cursor.getRowCount() == 3);
                Assert.assertFalse(cursor.eof());
                Assert.assertTrue(cursor.previous());
                // at 0.
                Assert.assertFalse(cursor.previous());
                Assert.assertTrue(cursor.eof());
                Assert.assertTrue(cursor.getRowCount() == 3);
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.