elixir-ecto / db_connection

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

Introduce begin, rollback and commit #88

Closed fishcakez closed 7 years ago

fishcakez commented 7 years ago

rollback/2 is overloaded and has old behaviour inside transaction/3 for backwards compatibility. However transaction/3 is deprecated because is makes assumptions about database status that may not hold.

New return values from handle_begin/2, handle_rollback/2 and handle_commit/2 allow to signal mistaken database status.

fishcakez commented 7 years ago

This change is backwards compatible, so the plan is to soft deprecated transaction/3.