KogenCredo.Diff.Rules.LostTransaction (KogenCredo v0.1.0)

View Source

lost-transaction: the base wrapped its writes in Repo.transaction / Repo.transact (an Ecto.Multi is run through one of these), the head has none, and at least two repo writes (insert, update, delete, insert_all, ...) remain.

The function and the same-module helpers it reaches are compared, so moving the transaction into a helper is quiet. The repo receiver is alias-aware.

Limits

A transaction moved to the caller or to another module, or Ecto.Multi steps whose Repo.transaction sits in a different function, cannot be tracked. Writes inside a Multi.run callback are counted only when they are written as repo calls. Advisory by default; no precision has been measured.