{"record":{"id":"1bc261c2c41218af","repo":"apache/shardingsphere","slug":"rowdeleted","errorCode":null,"errorMessage":"rowDeleted","messagePattern":"rowDeleted","errorType":"exception","errorClass":"SQLFeatureNotSupportedException","httpStatus":null,"severity":"error","filePath":"jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/unsupported/AbstractUnsupportedOperationResultSet.java","lineNumber":140,"sourceCode":"    \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\n    public final NClob getNClob(final int columnIndex) throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"getNClob\");\n    }\n    \n    @Override","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/apache/shardingsphere/blob/e952770a215630a3659c75d64369168cd3e26b82/jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/unsupported/AbstractUnsupportedOperationResultSet.java#L122-L158","documentation":"rowDeleted() is final in AbstractUnsupportedOperationResultSet and always throws SQLFeatureNotSupportedException. Because deletes must go through SQL statements and never through the merged cursor, the sharding ResultSet cannot report cursor-visible deletions.","triggerScenarios":"Calling ResultSet.rowDeleted() on a ResultSet obtained from ShardingSphereDataSource — usually in grids that grey out rows deleted via deleteRow, or sync loops that skip rows removed since the last fetch.","commonSituations":"Row-filtering logic ported from single-database drivers that support updatable cursors; master-detail UIs that rely on visible-delete semantics; JDBC tutorial-derived utility classes.","solutions":["Track deletions in application state (a set of deleted keys recorded when DELETE statements execute).","Use SQL to determine existence (SELECT ... WHERE key = ?) instead of asking the cursor.","Remove cursor-delete flows entirely and re-query after deletes."],"exampleFix":"// before\nwhile (rs.next()) { if (rs.rowDeleted()) continue; ... } // throws\n\n// after\nSet<Long> deletedIds = new HashSet<>(); // maintained by your DELETE code\nwhile (rs.next()) { if (deletedIds.contains(rs.getLong(\"id\"))) continue; ... }","handlingStrategy":"try-catch","validationCode":"// app-side existence check replaces the cursor probe\nboolean deleted = deletedIds.contains(rs.getLong(\"id\"));","typeGuard":null,"tryCatchPattern":"try {\n    boolean deleted = rs.rowDeleted();\n} catch (SQLFeatureNotSupportedException e) {\n    deleted = deletedIds.contains(id);\n}","preventionTips":["Record deleted keys when issuing DELETE statements.","Re-query instead of scanning for visible deletes."],"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"}