Open wquark opened 4 months ago
Good find. We should probably implement transaction
with TransactionBuilder
to avoid having two places that need to deal with this.
Makes sense. Anything else you need from my end? Is this something you'd knock out quickly or would you rather have a PR?
Either way!
batch_execute
submits the creation of the transaction (https://github.com/sfackler/rust-postgres/blob/master/tokio-postgres/src/transaction_builder.rs#L109), but theTransaction
object itself may never be constructed in case the future is dropped.https://github.com/sfackler/rust-postgres/commit/f6189a95f24af45068ecfd6e3c4e6b71ac8e43fe fixed it for
Client::transaction
.