Package java.sql

Examples of java.sql.ResultSet.previous()


        assertTrue("Expected rowUpdated() to return true", rs.rowUpdated());
        assertTrue("Expected rowDeleted() to return true", rs.rowDeleted());
        rs.next();
        assertFalse("Expected rowUpdated() to return false", rs.rowUpdated());
        assertFalse("Expected rowDeleted() to return false", rs.rowDeleted());
        rs.previous();
        assertTrue("Expected rowUpdated() to return true", rs.rowUpdated());
        assertTrue("Expected rowDeleted() to return true", rs.rowDeleted());
        rs.close();
        s.close();
    }
View Full Code Here


                QUERY_NOT_QUALIFIED_FOR_UPDATABLE_RESULTSET);
       
        // call positioning methods
        rs.next();
        rs.next();
        rs.previous();
        rs.relative(1);
        rs.absolute(3);
        rs.relative(-1);
        rs.first();
        rs.last();
View Full Code Here

        checkContentsBeforeAndAfterUpdatingBlob(rs);
        rs.relative(3);
        checkContentsBeforeAndAfterUpdatingBlob(rs);
        rs.absolute(7);
        checkContentsBeforeAndAfterUpdatingBlob(rs);
        rs.previous();
        checkContentsBeforeAndAfterUpdatingBlob(rs);
        rs.last();
        checkContentsBeforeAndAfterUpdatingBlob(rs);
        rs.previous();
        checkContentsBeforeAndAfterUpdatingBlob(rs);
View Full Code Here

        checkContentsBeforeAndAfterUpdatingBlob(rs);
        rs.previous();
        checkContentsBeforeAndAfterUpdatingBlob(rs);
        rs.last();
        checkContentsBeforeAndAfterUpdatingBlob(rs);
        rs.previous();
        checkContentsBeforeAndAfterUpdatingBlob(rs);

        rs.close();
        scrollStmt.close();
View Full Code Here

        updateBlobWithUpdateBinaryStream(rs);
        rs.relative(3);
        updateBlobWithUpdateBinaryStream(rs);
        rs.absolute(7);
        updateBlobWithUpdateBinaryStream(rs);
        rs.previous();
        updateBlobWithUpdateBinaryStream(rs);
        rs.last();
        updateBlobWithUpdateBinaryStream(rs);
        rs.previous();
        updateBlobWithUpdateBinaryStream(rs);
View Full Code Here

        updateBlobWithUpdateBinaryStream(rs);
        rs.previous();
        updateBlobWithUpdateBinaryStream(rs);
        rs.last();
        updateBlobWithUpdateBinaryStream(rs);
        rs.previous();
        updateBlobWithUpdateBinaryStream(rs);

        rs.close();
        scrollStmt.close();
View Full Code Here

    public void testZeroRowResultPositioning() throws SQLException
    {
        Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
        ResultSet rs = stmt.executeQuery("SELECT * FROM pg_database WHERE datname='nonexistantdatabase'");
        assertTrue(!rs.previous());
        assertTrue(!rs.previous());
        assertTrue(!rs.next());
        assertTrue(!rs.next());
        assertTrue(!rs.next());
        assertTrue(!rs.next());
View Full Code Here

    public void testZeroRowResultPositioning() throws SQLException
    {
        Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
        ResultSet rs = stmt.executeQuery("SELECT * FROM pg_database WHERE datname='nonexistantdatabase'");
        assertTrue(!rs.previous());
        assertTrue(!rs.previous());
        assertTrue(!rs.next());
        assertTrue(!rs.next());
        assertTrue(!rs.next());
        assertTrue(!rs.next());
        assertTrue(!rs.next());
View Full Code Here

        assertTrue(!rs.next());
        assertTrue(!rs.next());
        assertTrue(!rs.next());
        assertTrue(!rs.next());
        assertTrue(!rs.next());
        assertTrue(!rs.previous());
        assertTrue(!rs.first());
        assertTrue(!rs.last());
        assertEquals(0, rs.getRow());
        assertTrue(!rs.absolute(1));
        assertTrue(!rs.relative(1));
View Full Code Here

        assertTrue(!rs.isBeforeFirst());
        assertTrue(rs.isAfterLast());
        assertTrue(!rs.isFirst());
        assertTrue(!rs.isLast());

        assertTrue(rs.previous());

        assertTrue(!rs.isBeforeFirst());
        assertTrue(!rs.isAfterLast());
        assertTrue(rs.isFirst());
        assertTrue(rs.isLast());
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.