Java Code Examples for java.sql.ResultSet#updateByte()

The following examples show how to use java.sql.ResultSet#updateByte() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ParameterMappingTest.java    From spliceengine with GNU Affero General Public License v3.0 5 votes vote down vote up
private void assertUpdateState(
    ResultSet rs,
    String colName,
    long value,
    double dvalue,
    int updateType,
    String expected) throws SQLException {

    try {
        switch (updateType) {
        case XXX_BYTE:
            rs.updateByte(colName, (byte)value);
            break;
        case XXX_SHORT:
            rs.updateShort(colName, (short)value);
        case XXX_INT:
            rs.updateInt(colName, (int)value);
            break;
        case XXX_LONG:
            rs.updateLong(colName, value);
            break;
        case XXX_FLOAT:
            rs.updateFloat(colName, (float)dvalue);
            break;
        case XXX_DOUBLE:
            rs.updateDouble(colName, dvalue);
            break;
        default:
            fail("wrong argument");
        }

        fail("exception expected");
    } catch (SQLException e) {
        println(e.toString());
        assertSQLState(expected, e);
    }
}
 
Example 2
Source File: UnsupportedUpdateOperationResultSetTest.java    From sharding-jdbc-1.5.1 with Apache License 2.0 4 votes vote down vote up
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateByteForColumnIndex() throws SQLException {
    for (ResultSet each : resultSets) {
        each.updateByte(1, (byte) 1);
    }
}
 
Example 3
Source File: UnsupportedUpdateOperationResultSetTest.java    From sharding-jdbc-1.5.1 with Apache License 2.0 4 votes vote down vote up
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateByteForColumnLabel() throws SQLException {
    for (ResultSet each : resultSets) {
        each.updateByte("label", (byte) 1);
    }
}
 
Example 4
Source File: UnsupportedUpdateOperationResultSetTest.java    From shardingsphere with Apache License 2.0 4 votes vote down vote up
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateByteForColumnIndex() throws SQLException {
    for (ResultSet each : resultSets) {
        each.updateByte(1, (byte) 1);
    }
}
 
Example 5
Source File: UnsupportedUpdateOperationResultSetTest.java    From shardingsphere with Apache License 2.0 4 votes vote down vote up
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateByteForColumnLabel() throws SQLException {
    for (ResultSet each : resultSets) {
        each.updateByte("label", (byte) 1);
    }
}
 
Example 6
Source File: SQLTinyint.java    From gemfirexd-oss with Apache License 2.0 votes vote down vote up
/**
	Set this value into a ResultSet for a subsequent ResultSet.insertRow
	or ResultSet.updateRow. This method will only be called for non-null values.

	@exception SQLException thrown by the ResultSet object
	@exception StandardException thrown by me accessing my value.
*/
public final void setInto(ResultSet rs, int position) throws SQLException, StandardException {
	rs.updateByte(position, value);
}
 
Example 7
Source File: SQLTinyint.java    From gemfirexd-oss with Apache License 2.0 votes vote down vote up
/**
	Set this value into a ResultSet for a subsequent ResultSet.insertRow
	or ResultSet.updateRow. This method will only be called for non-null values.

	@exception SQLException thrown by the ResultSet object
	@exception StandardException thrown by me accessing my value.
*/
public final void setInto(ResultSet rs, int position) throws SQLException, StandardException {
	rs.updateByte(position, value);
}
 
Example 8
Source File: SQLTinyint.java    From spliceengine with GNU Affero General Public License v3.0 votes vote down vote up
/**
	Set this value into a ResultSet for a subsequent ResultSet.insertRow
	or ResultSet.updateRow. This method will only be called for non-null values.

	@exception SQLException thrown by the ResultSet object
	@exception StandardException thrown by me accessing my value.
*/
public final void setInto(ResultSet rs, int position) throws SQLException, StandardException {
	rs.updateByte(position, value);
}