Moebius.Connection (Moebius v5.0.1)

Copy Markdown View Source

The handle transaction/1 passes to your callback.

Pass it on to run/2, run/3 and save/3 so those statements run inside the transaction. (Calls that leave it out also join the transaction, as long as they run in the same process and on the same database.)

A handle is valid only in its owning process during its active checkout. Do not retain it after the callback returns or pass it to a Task or another database module.

Summary

Types

t()

@type t() :: %Moebius.Connection{
  owner: pid(),
  pid: pid(),
  pool: atom(),
  ref: reference()
}