odbc-rs
odbc-rs copied to clipboard
affected_row_count should be implemented for all executed statements (including Prepared)
Currently affected_row_count
method is available for direct query (Allocated
/Executed
) and Prepared
with HasResult
but not for prepared query with NoResult
.
If you run INSERT via prepared query you can't get the number of affected rows.
This looks all wrong to me though... Executed
is an alias Allocated
so you can't distinguish based on this on type system level. Also Prepared
has no concept of Executed
so you can only work with HasResult
/NoResult
on type system level. Ideally you could add another type parameter and have two pairs Direct
/Prepared
and Allocated
/Executed
so that you can implement affected_row_count
to any type that is Executed
and change Executed
to Allocated
with close_cursor
method.