DBConnection.Ownership.ownership_mode
You're seeing just the function
ownership_mode
, go back to DBConnection.Ownership module for more information.
Specs
ownership_mode( GenServer.server(), :auto | :manual | {:shared, pid()}, Keyword.t() ) :: :ok | :already_shared | :not_owner | :not_found
Changes the ownership mode.
mode
may be :auto
, :manual
or {:shared, owner}
.
The operation will always succeed when setting the mode to
:auto
or :manual
. It may fail with reason :not_owner
or :not_found
when setting {:shared, pid}
and the
given pid does not own any connection. May return
:already_shared
if another process set the ownership
mode to {:shared, _}
and is still alive.