From 0f992e8be4d00d81face35329e6ecac9c0e91b95 Mon Sep 17 00:00:00 2001 From: Moritz Schmale Date: Thu, 17 Jun 2021 11:43:57 +0200 Subject: [PATCH] add checked_out?/0 to repo.ex --- lib/repo/repo.ex | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/repo/repo.ex b/lib/repo/repo.ex index 1e546f0..f9ec35e 100644 --- a/lib/repo/repo.ex +++ b/lib/repo/repo.ex @@ -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