Closed ieow closed 3 years ago
Hi ieow. Yes, there is support for both r2d2 and transactions. For a very basic example with r2d2, see butane/tests/r2d2.rs. For transactions, I am just now realizing there isn't a good example or test. Let me see if I can add one tonight. Let me know if there are any particular points of confusion you'd like to see covered.
Thanks for the pointer!
I've also just added a couple basic tests with usage of Transaction. https://github.com/Electron100/butane/commit/b4dcc8a4352a935af3de84bb6f6877d5b2890362 Let me know if this helps or if things are still unclear
Thanks! The example is crystal clear for me.
btw, I note that transaction_builder(pg)/transaction_with_behavior(sqlite) is not implemented. I don't think I will use it but just wondering if it will be implemented
Since Butane's goal is as a high-level ORM, I don't necessarily plan to support every feature that the underlying database backends could. I don't have any immediate plans to add support for advanced transaction options, but I'm certainly not opposed to it if there's interest.
Thanks for the reply! One more question, if I am correct, butane uses synchronous backend right? Why not use async ?
Hi, I am new to rust.
I notice that there is struct Transaction and ConnectionManager for r2d2 in butane document, I am wondering if butane have example/support for transaction and r2d2.