Repository navigation
Report -1 for statements that are not INSERT, UPDATE or DELETE - #374
Conversation
Coverage Report for CI Build 39438113753Coverage increased (+0.1%) to 92.624%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
|
Thanks. For INSERT, UPDATE, DELETE, SELECT, DDL and
1.
|
|
Addressed the review feedback in 5327966:\n\n- Added the DuckDB 1.5.6 statement types |
DbCommand.ExecuteNonQuery: "For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command. For all other types of statements, the return value is -1." DbDataReader.RecordsAffected: "-1 for SELECT statements; 0 if no rows were affected". The reader returned -1 even after a DELETE. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5327966 to
2004f78
Compare
2004f78 to
700ea93
Compare
Two affected-row counts disagreed with the ADO.NET contract:\n\n- ExecuteNonQuery now returns -1 for non-row-counting statements and counts INSERT, UPDATE, DELETE, COPY, and MERGE.\n- ExecuteReader().RecordsAffected counts those statements as well.\n- DML statements with RETURNING use the query result row count, including materialized and streaming results.\n\nTests cover non-DML, zero-row DML, MERGE, COPY, DML with RETURNING, and RecordsAffected through ExecuteReader. The focused ExecuteNonQueryTests suite passes 11/11.\n\nFound by the pengdows ADO.NET conformance suite, which runs the documented System.Data.Common contract against every provider.