Skip to content

Commit

Permalink
add checked_out?/0 to repo.ex
Browse files Browse the repository at this point in the history
  • Loading branch information
narrowtux committed Jun 17, 2021
1 parent 4b62ddc commit 0f992e8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/repo/repo.ex
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@ defmodule ExAudit.Repo do

defoverridable(child_spec: 1)

def checked_out? do
{adapter, meta} = Ecto.Repo.Registry.lookup(get_dynamic_repo())
adapter.checked_out?(meta)
end

# additional functions

def history(struct, opts \\ []) do
Expand Down

0 comments on commit 0f992e8

Please sign in to comment.