{"record":{"id":"c511ff92fff80c97","repo":"prestodb/presto","slug":"updateint","errorCode":null,"errorMessage":"updateInt","messagePattern":"updateInt","errorType":"exception","errorClass":"SQLFeatureNotSupportedException","httpStatus":null,"severity":"error","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSet.java","lineNumber":802,"sourceCode":"    @Override\n    public void updateByte(int columnIndex, byte x)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"updateByte\");\n    }\n\n    @Override\n    public void updateShort(int columnIndex, short x)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"updateShort\");\n    }\n\n    @Override\n    public void updateInt(int columnIndex, int x)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"updateInt\");\n    }\n\n    @Override\n    public void updateLong(int columnIndex, long x)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"updateLong\");\n    }\n\n    @Override\n    public void updateFloat(int columnIndex, float x)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"updateFloat\");\n    }\n\n    @Override\n    public void updateDouble(int columnIndex, double x)","sourceCodeStart":784,"sourceCodeEnd":820,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSet.java#L784-L820","documentation":"PrestoResultSet.updateInt(columnIndex, x) is an unimplemented stub that throws SQLFeatureNotSupportedException unconditionally. The Presto JDBC driver deliberately does not implement the updatable result set API; every updateXxx method is a throw-only stub. Writes must go through SQL statements.","triggerScenarios":"Calling rs.updateInt(i, value) on a Presto ResultSet, often as part of an updateRow()/insertRow() sequence.","commonSituations":"ORM or data-entry tooling that edits rows in place; sample JDBC code reused against Presto; frameworks probing update support at runtime and hitting this first.","solutions":["Issue an UPDATE statement via PreparedStatement with setInt instead","Use INSERT statements plus executeUpdate() to add rows rather than insertRow()","Gate any updateXxx usage behind supportsResultSetConcurrency checks that will be false for Presto","Catch SQLFeatureNotSupportedException and route to the SQL-write code path"],"exampleFix":"// before\nrs.updateInt(\"count\", 42);\nrs.updateRow();\n// after\ntry (PreparedStatement ps = conn.prepareStatement(\"UPDATE t SET count = ? WHERE id = ?\")) {\n    ps.setInt(1, 42);\n    ps.setLong(2, id);\n    ps.executeUpdate();\n}","handlingStrategy":"validation","validationCode":"DatabaseMetaData md = conn.getMetaData();\nif (!md.supportsResultSetConcurrency(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE)) {\n    // use PreparedStatement UPDATE instead of rs.updateInt\n}","typeGuard":"boolean isUpdatable(ResultSet rs) throws SQLException {\n    return rs.getConcurrency() == ResultSet.CONCUR_UPDATABLE;\n}","tryCatchPattern":"try {\n    rs.updateInt(columnIndex, value);\n} catch (SQLFeatureNotSupportedException e) {\n    // route to SQL UPDATE fallback\n}","preventionTips":["Express modifications as UPDATE/INSERT statements","Keep result sets CONCUR_READ_ONLY","Feature-detect updatable support before any updateXxx call","Replace positioned-update frameworks with SQL-generating ones"],"tags":["jdbc","unsupported-feature","updatable-resultset","sqlfeaturenotsupportedexception"],"backgroundTag":"sqlfeaturenotsupported-unsupported-jdbc-method","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}