{"record":{"id":"54a05984817186dd","repo":"prestodb/presto","slug":"updatelong","errorCode":null,"errorMessage":"updateLong","messagePattern":"updateLong","errorType":"exception","errorClass":"SQLFeatureNotSupportedException","httpStatus":null,"severity":"error","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSet.java","lineNumber":809,"sourceCode":"    @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)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"updateDouble\");\n    }\n\n    @Override\n    public void updateBigDecimal(int columnIndex, BigDecimal x)","sourceCodeStart":791,"sourceCodeEnd":827,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSet.java#L791-L827","documentation":"PrestoResultSet.updateLong(columnIndex, x) is an unimplemented stub that always throws SQLFeatureNotSupportedException. Presto does not support updatable result sets, so this method can never succeed. Its only purpose is to fulfill the java.sql.ResultSet contract.","triggerScenarios":"Calling rs.updateLong(i, value) on any ResultSet from the Presto JDBC driver.","commonSituations":"JDBC code written for updatable result sets on traditional engines; generic database GUI/ETL tools that attempt in-place edits of query results.","solutions":["Replace with an UPDATE SQL statement using setLong","Perform all modifications via DML statements, keeping the ResultSet read-only","Check DatabaseMetaData capabilities before using positioned-update APIs","Catch SQLFeatureNotSupportedException and provide a clear read-only error message in generic code"],"exampleFix":"// before\nrs.updateLong(\"id\", 99);\nrs.updateRow();\n// after\ntry (PreparedStatement ps = conn.prepareStatement(\"UPDATE t SET id = ? WHERE id = ?\")) {\n    ps.setLong(1, 99);\n    ps.setLong(2, oldId);\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.updateLong\n}","typeGuard":"boolean isUpdatable(ResultSet rs) throws SQLException {\n    return rs.getConcurrency() == ResultSet.CONCUR_UPDATABLE;\n}","tryCatchPattern":"try {\n    rs.updateLong(columnIndex, value);\n} catch (SQLFeatureNotSupportedException e) {\n    // route to SQL UPDATE fallback\n}","preventionTips":["Never attempt in-place row edits on Presto result sets","Use PreparedStatement.setLong with an UPDATE statement","Verify updatable-resultset support before using updateXxx APIs","Handle SQLFeatureNotSupportedException as a permanent, non-retryable condition"],"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"}