Merge 'bindings/rust: Return number of rows changed from Connection::execute()' from Rohith Suresh

Fixes #1904
This PR changes the existing behaviour of Connection.execute to not
return 0, but the number of rows that have been changed by the operation
within. The changes are:
1. Adds a getter for n_change and the execute function now returns the
n_change value
2. Integration test  to test the behaviour

Closes #1987
This commit is contained in:
Pekka Enberg
2025-07-20 09:49:51 +03:00
3 changed files with 87 additions and 1 deletions

View File

@@ -1079,6 +1079,10 @@ impl Statement {
}
}
pub fn n_change(&self) -> i64 {
self.program.n_change.get()
}
pub fn set_mv_tx_id(&mut self, mv_tx_id: Option<u64>) {
self.state.mv_tx_id = mv_tx_id;
}