{"record":{"id":"0f724f4fb759d0e9","repo":"apache/shardingsphere","slug":"rowupdated","errorCode":null,"errorMessage":"rowUpdated","messagePattern":"rowUpdated","errorType":"exception","errorClass":"SQLFeatureNotSupportedException","httpStatus":null,"severity":"error","filePath":"jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/unsupported/AbstractUnsupportedOperationResultSet.java","lineNumber":135,"sourceCode":"    \n    @Override\n    public final void moveToInsertRow() throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"moveToInsertRow\");\n    }\n    \n    @Override\n    public final void moveToCurrentRow() throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"moveToCurrentRow\");\n    }\n    \n    @Override\n    public final boolean rowInserted() throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"rowInserted\");\n    }\n    \n    @Override\n    public final boolean rowUpdated() throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"rowUpdated\");\n    }\n    \n    @Override\n    public final boolean rowDeleted() throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"rowDeleted\");\n    }\n    \n    @Override\n    public final String getCursorName() throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"getCursorName\");\n    }\n    \n    @Override\n    public final int getHoldability() throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"getHoldability\");\n    }\n    \n    @Override","sourceCodeStart":117,"sourceCodeEnd":153,"githubUrl":"https://github.com/apache/shardingsphere/blob/e952770a215630a3659c75d64369168cd3e26b82/jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/unsupported/AbstractUnsupportedOperationResultSet.java#L117-L153","documentation":"rowUpdated() is final in AbstractUnsupportedOperationResultSet and unconditionally throws SQLFeatureNotSupportedException. The sharding ResultSet has no updatable cursor, so it cannot report whether the current row was modified via updateRow.","triggerScenarios":"Calling ResultSet.rowUpdated() on a sharding ResultSet, typically in UI grids or audit logic that highlights rows changed through positioned updates.","commonSituations":"Change-highlighting in editable table components; conflict-detection code written for single-DB drivers; reuse of vendor sample code for CONCUR_UPDATABLE on the sharding URL.","solutions":["Maintain dirty-row state in the application (compare against the original fetched values) instead of querying the ResultSet.","Detect changes with SQL (e.g. compare an updated_at/version column in a keyed SELECT).","Avoid cursor updates entirely — issue UPDATE statements, which never need rowUpdated."],"exampleFix":"// before\nif (rs.rowUpdated()) { markDirty(row); } // throws\n\n// after\nboolean dirty = !Objects.equals(fetchedValue, currentValue);\nif (dirty) { markDirty(row); }","handlingStrategy":"try-catch","validationCode":"// no capability probe; compare values instead before relying on rowUpdated\nboolean dirty = !Objects.equals(originalValue, rs.getObject(col));","typeGuard":null,"tryCatchPattern":"try {\n    boolean updated = rs.rowUpdated();\n} catch (SQLFeatureNotSupportedException e) {\n    updated = appDirtySet.contains(id);\n}","preventionTips":["Keep original fetched values and diff in application code.","Use version/updated_at columns for change detection.","All modifications via SQL — then rowUpdated is never needed."],"tags":["jdbc","resultset","row-updates","shardingsphere","unsupported-operation"],"backgroundTag":null,"analyzedSha":"e952770a215630a3659c75d64369168cd3e26b82","analyzedAt":"2026-08-14T13:54:53.392Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}