Skip to content

Commit bac4fcb

Browse files
committed
chore: Add @moduledocs
1 parent 8f5301a commit bac4fcb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/ecto_watch/db.ex

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
defmodule EctoWatch.DB do
2+
@moduledoc "Mockable simple queries to PostgreSQL"
3+
24
@callback max_identifier_length(repo_mod :: atom()) :: integer()
35
@callback major_version(repo_mod :: atom()) :: integer()
46

57
def supports_create_or_replace_trigger?(repo_mod) do
68
major_version(repo_mod) >= 14
79
end
810

9-
# TODO
1011
def max_identifier_length(repo_mod), do: mod().max_identifier_length(repo_mod)
1112
def major_version(repo_mod), do: mod().major_version(repo_mod)
1213

1314
defp mod do
14-
Application.get_env(:ecto_watch, EctoWatch.DB)[:mod]
15+
Application.get_env(:ecto_watch, EctoWatch.DB)[:mod] || EctoWatch.DB.Live
1516
end
1617
end
1718

1819
defmodule EctoWatch.DB.Live do
20+
@moduledoc "Actual implementation of EctoWatch.DB"
21+
1922
@behaviour EctoWatch.DB
2023

2124
def max_identifier_length(repo_mod) do

0 commit comments

Comments
 (0)