refactor: extract sql_sandbox config to Mv.Config module
Centralize application-wide configuration values for better maintainability.
This commit is contained in:
parent
961261eff2
commit
b2c2013b4d
1 changed files with 24 additions and 0 deletions
24
lib/mv/config.ex
Normal file
24
lib/mv/config.ex
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
defmodule Mv.Config do
|
||||||
|
@moduledoc """
|
||||||
|
Configuration helper functions for the application.
|
||||||
|
|
||||||
|
Provides centralized access to configuration values to avoid
|
||||||
|
magic strings/atoms scattered throughout the codebase.
|
||||||
|
"""
|
||||||
|
|
||||||
|
@doc """
|
||||||
|
Returns whether SQL sandbox mode is enabled.
|
||||||
|
|
||||||
|
SQL sandbox mode is typically enabled in test environments
|
||||||
|
to allow concurrent database access in tests.
|
||||||
|
|
||||||
|
## Returns
|
||||||
|
|
||||||
|
- `true` if SQL sandbox is enabled
|
||||||
|
- `false` otherwise
|
||||||
|
"""
|
||||||
|
@spec sql_sandbox?() :: boolean()
|
||||||
|
def sql_sandbox? do
|
||||||
|
Application.get_env(:mv, :sql_sandbox, false)
|
||||||
|
end
|
||||||
|
end
|
||||||
Loading…
Add table
Add a link
Reference in a new issue