Skip to content

execute() returns 0 affected rows for DML — needs mssql-tds DONE token row count #43

Description

@saurabh500

Client::execute() currently returns 0 for INSERT/UPDATE/DELETE because mssql-tds does not expose row counts from DONE tokens through its public API. get_current_resultset() returns None for DML statements, so there are no result rows to count.

Upstream fix needed: mssql-tds should expose rows_affected from consume_done_token() — either as a return value from execute() or via a public method on TdsClient.

Blocked test: execute_insert_update_delete in tests/tiberius_compat.rs is #[ignore] until this is resolved.

Upstream ref: https://github.com/microsoft/mssql-rsTdsClient::consume_done_token() already tracks done.row_count internally but the method is pub(crate).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions