Examples of refreshRow()


Examples of com.alibaba.druid.proxy.jdbc.ResultSetProxy.refreshRow()

        Statement stmt = conn.createStatement();
        ResultSetProxy rs = (ResultSetProxy) stmt.executeQuery(sql);

        rs.insertRow();
        rs.refreshRow();
        rs.moveToInsertRow();
        rs.moveToCurrentRow();
        rs.next();

        rs.updateRef(1, null);
View Full Code Here

Examples of java.sql.ResultSet.refreshRow()

            int id = rs.getInt(1);
            if (id % 2 == 0) {
                Statement s2 = c2.createStatement();
                s2.execute("UPDATE TEST SET NAME = NAME || '+' WHERE ID = " + rs.getInt(1));
                if (id % 4 == 0) {
                    rs.refreshRow();
                }
                rs.updateString(2, "Updated " + rs.getString(2));
                rs.updateRow();
            } else {
                rs.deleteRow();
View Full Code Here

Examples of java.sql.ResultSet.refreshRow()

        assertEquals("FAIL - column 2 should have the original value",
                c2Before, rs.getString(2));
       
        // refreshRow will fail, not implemented for this type of result set
        try {
            rs.refreshRow();
            fail("FAIL - refreshRow not implemented for this type of " +
                    "result set");
        } catch (SQLException e) {
            String sqlState = usingEmbedded() ? "0A000" : "XJ125";
            assertSQLState(sqlState, e);
View Full Code Here

Examples of java.sql.ResultSet.refreshRow()

            rs.updateRow();
            assertTrue(rs2.last());
            assertEquals(17, rs2.getInt(1));
            assertEquals("NEW LINE 17", rs2.getString(3));
            rs.deleteRow();
            rs2.refreshRow();
            assertTrue(rs2.rowDeleted());
            rs2.close();
            stmt2.close();
            rs.close();
            stmt.close();
View Full Code Here

Examples of java.sql.ResultSet.refreshRow()

    assertEquals(2, rs.getInt(1));
    assertEquals(string, rs.getString(2));
    assertEquals(string, rs.getString(3));
    assertTrue(Arrays.equals(bytes, rs.getBytes(4)));

    rs.refreshRow();

    assertEquals(2, rs.getInt(1));
    assertEquals(string, rs.getString(2));
    assertEquals(string, rs.getString(3));
    assertTrue(Arrays.equals(bytes, rs.getBytes(4)));
View Full Code Here

Examples of java.sql.ResultSet.refreshRow()

    rs.updateString("name", "paul");

    rs.insertRow();

    try {
      rs.refreshRow();
      fail("Can't refresh when on the insert row.");
    }
    catch (SQLException sqle) {
      // Expected...
    }
View Full Code Here

Examples of java.sql.ResultSet.refreshRow()

    catch (SQLException e) {
      // Expected...
    }

    try {
      rs.refreshRow();
      fail("expected an exception when calling refreshRow() on the insert row");
    }
    catch (SQLException e) {
      // Expected...
    }
View Full Code Here

Examples of java.sql.ResultSet.refreshRow()

            pstmt2 = conn.prepareStatement("SELECT * FROM T_PRE_STMT_TEST ORDER BY 2",
                                           ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
            rs = pstmt2.executeQuery();
            rs.next();
            try {
                rs.refreshRow();
            } catch (SQLFeatureNotSupportedException ex) {

            }
            try {
                rs.insertRow();
View Full Code Here

Examples of javax.sql.rowset.spi.SyncResolver.refreshRow()

        } catch (UnsupportedOperationException e) {
            // expected
        }

        try {
            resolver.refreshRow();
            fail("Should throw UnsupportedOperationException");
        } catch (UnsupportedOperationException e) {
            // expected
        }
View Full Code Here

Examples of javax.sql.rowset.spi.SyncResolver.refreshRow()

        } catch (UnsupportedOperationException e) {
            // expected
        }

        try {
            resolver.refreshRow();
            fail("Should throw UnsupportedOperationException");
        } catch (UnsupportedOperationException e) {
            // expected
        }
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.