File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 11defmodule 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
1617end
1718
1819defmodule 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
You can’t perform that action at this time.
0 commit comments