elixir-ecto / db_connection

Database connection behaviour
http://hexdocs.pm/db_connection/DBConnection.html
309 stars 112 forks source link

Add ownership behavior with `checkout` and `checkin` callbacks #149

Closed fishcakez closed 6 years ago

fishcakez commented 6 years ago

After #148 we need a way to handle changes that occur on checkout and checkin so we can still create Ecto sandbox. This needs to be able to change the module and state, then reverse it before returning to the pool (on checkin, disconnect and stop). It should take an options argument so we know whether to start transaction or not in sandbox.

josevalim commented 6 years ago

Closing in favor of #156.