{"record":{"id":"1423f5bfe9af21ce","repo":"prestodb/presto","slug":"updateboolean","errorCode":null,"errorMessage":"updateBoolean","messagePattern":"updateBoolean","errorType":"exception","errorClass":"SQLFeatureNotSupportedException","httpStatus":null,"severity":"error","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSet.java","lineNumber":781,"sourceCode":"    @Override\n    public boolean rowDeleted()\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"rowDeleted\");\n    }\n\n    @Override\n    public void updateNull(int columnIndex)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"updateNull\");\n    }\n\n    @Override\n    public void updateBoolean(int columnIndex, boolean x)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"updateBoolean\");\n    }\n\n    @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)","sourceCodeStart":763,"sourceCodeEnd":799,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSet.java#L763-L799","documentation":"PrestoResultSet.updateBoolean(columnIndex, x) is an unimplemented stub that always throws SQLFeatureNotSupportedException. Presto does not expose updatable result sets; column values in a result set come from query evaluation and cannot be modified through the driver. This is intentional driver behavior, not a transient failure.","triggerScenarios":"Calling rs.updateBoolean(i, value) on a Presto ResultSet, usually followed by updateRow().","commonSituations":"Porting JDBC code from updatable-ResultSet workflows on traditional databases; frameworks that write cell edits back through the ResultSet.","solutions":["Replace with an UPDATE SQL statement through a PreparedStatement","Perform the boolean conversion in application code and persist it with UPDATE table SET col = ?","Request CONCUR_READ_ONLY up front and keep all writes in SQL","Catch SQLFeatureNotSupportedException in generic paths and fall back to statement-based updates"],"exampleFix":"// before\nrs.updateBoolean(\"active\", true);\nrs.updateRow();\n// after\ntry (PreparedStatement ps = conn.prepareStatement(\"UPDATE t SET active = ? WHERE id = ?\")) {\n    ps.setBoolean(1, true);\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.updateBoolean\n}","typeGuard":"boolean isUpdatable(ResultSet rs) throws SQLException {\n    return rs.getConcurrency() == ResultSet.CONCUR_UPDATABLE;\n}","tryCatchPattern":"try {\n    rs.updateBoolean(columnIndex, value);\n} catch (SQLFeatureNotSupportedException e) {\n    // route to SQL UPDATE fallback\n}","preventionTips":["Never call updateXxx on Presto result sets","Keep all writes in SQL statements","Verify concurrency support via DatabaseMetaData once at startup","Choose Presto-compatible persistence layers that generate DML"],"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"}