Examples of afterLast()


Examples of java.sql.ResultSet.afterLast()

        // Test that it is possible to move afterLast from insertRow
        currentPosition = rs.getRow();
        rs.moveToInsertRow();
        rs.updateInt(1, currentPosition + 1000);
        rs.afterLast();
        assertTrue("isAfterLast() should return true", rs.isAfterLast());
        rs.previous();
        assertEquals("CurrentPosition should be " + lastRow,
                rs.getRow(), lastRow);
        assertTrue("isLast() should return true", rs.isLast());
View Full Code Here

Examples of java.sql.ResultSet.afterLast()

        rs.moveToCurrentRow(); // needed until to DERBY-1322 is fixed

        rs.beforeFirst();
        checkDetectabilityCallsOutsideRow(rs, "on beforeFirst row");

        rs.afterLast();
        checkDetectabilityCallsOutsideRow(rs, "on afterLast row");

        rs.first();
        rs.deleteRow();
        checkDetectabilityCallsOutsideRow(rs, "after deleteRow");
View Full Code Here

Examples of java.sql.ResultSet.afterLast()

        // done
        rs.close();

        // Empty result set tests (DERBY-992)
        rs = s_i_r.executeQuery("select * from t where 1=0");
        rs.afterLast();
        assertFalse("afterLast() on empty RS should be no-op", rs.isAfterLast());
        rs.beforeFirst();
        assertFalse("beforeFirst() on empty RS should be no-op", rs
                .isBeforeFirst());

View Full Code Here

Examples of java.sql.ResultSet.afterLast()

        assertFalse(rs.previous());
        rs.close();
        rs = s_i_r.executeQuery("values 1, 2, 3, 4, 5, 6");
        assertNotNull(rs);

        rs.afterLast();
        // Iterate backwards thru RS, expect only 5 rows.
        for (int index = 1; index < 6; index++) {
            assertTrue(rs.previous());

        }
View Full Code Here

Examples of java.sql.ResultSet.afterLast()

        }
        // We should not see another row (only maxRows, not total)
        assertFalse(rs.next());

        // Start from afterLast and verify maxRows
        rs.afterLast();
        // Iterate backwards thru RS, expect only (maxRows - 1) rows.
        for (int index = 1; index < maxRows + 1; index++) {
            assertTrue(rs.previous());
            assertEquals(maxRows - index + 1, rs.getInt(1));
        }
View Full Code Here

Examples of java.sql.ResultSet.afterLast()

            assertEquals(1, rs.getRow());
            rs.close();
           
            // afterLast first
            rs = ps_c1.executeQuery();
            rs.afterLast();
            assertNoCurrentRow(rs);
            rs.previous();
           
            assertEquals("m",rs.getString(1).trim());
            assertEquals(13, rs.getInt(2));
View Full Code Here

Examples of javax.sql.rowset.CachedRowSet.afterLast()

            while (toCrset.next() && rs.next()) {
                index++;
                assertEquals(toCrset.getObject(14), rs.getObject(3));
            }
        } else {
            toCrset.afterLast();
            while (toCrset.previous() && rs.next()) {
                index++;
                assertEquals(toCrset.getObject(14), rs.getObject(3));
            }
        }
View Full Code Here

Examples of javax.sql.rowset.FilteredRowSet.afterLast()

        /*
         * Insert a row. when call updateXXX(), evaluate(Object value, int
         * column) is called to check first.
         */
        filteredRowSet.afterLast();
        filteredRowSet.moveToInsertRow();
        filteredRowSet.updateInt(1, 200);
        try {
            filteredRowSet.updateString("NAME", "test200");
            fail("should throw SQLException");
View Full Code Here

Examples of javax.sql.rowset.JdbcRowSet.afterLast()

        } catch (SQLException e) {
            // expected
        }
        jrs.addRowSetListener(new Listener());
        try {
            jrs.afterLast();
            fail("should throw SQLException");
        } catch (SQLException e) {
            // expected
        }
        try {
View Full Code Here

Examples of javax.sql.rowset.JdbcRowSet.afterLast()

        } catch (SQLException e) {
            // expected, Invalid state
        }

        try {
            jrs.afterLast();
            fail("Should throw SQLException");
        } catch (SQLException e) {
            // expected, Invalid state
        }
        try {
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.