Re:Database mocks are just not worth it
by AlexSW on Tuesday December 31, 2024 @09:42AM
(#42558954)
Could you give an example or two of languages/frameworks that have demonstrated abstracting the transaction blocks away? I'm not sure I'm following so I think this will help.
[ Parent
| on HN ]
Re:Database mocks are just not worth it
by pdimitar on Tuesday December 31, 2024 @09:51AM
(#42559011)
I lost the link to one Golang library that I liked very much but here's the link to Elixir's Ecto: https://hexdocs.pm/ecto_sql/Ecto.Adapters.SQL.Sandbox.html (not the perfect one, sorry, but can't be bothered to look for a better resource). The TL;DR is as above: it uses the same DB but does parallel connections to it and in each you have a transaction that's ultimately rolled back.