SelectoComponents.Debug.ConfigReader (selecto_components v0.3.21)

Reads and manages debug configuration from domain modules. Provides a centralized way to control debug information display.

Link to this section Summary

Functions

Creates a debug info map based on configuration.

Checks if debug is enabled for a domain and optional view type.

Checks if a specific debug feature is enabled.

Formats SQL query based on configuration.

Gets the debug configuration for a domain. Falls back to defaults if domain doesn't implement debug_config/0.

Gets the default debug configuration. Can be overridden via application config.

Gets configuration for a specific view type.

Truncates parameters based on configuration.

Link to this section Functions

Link to this function

build_debug_info(data, config)

@spec build_debug_info(map(), map()) :: map()

Creates a debug info map based on configuration.

Link to this function

debug_enabled?(domain_module, view_type \\ nil)

@spec debug_enabled?(module() | nil, atom() | nil) :: boolean()

Checks if debug is enabled for a domain and optional view type.

Link to this function

feature_enabled?(domain_module, feature, view_type \\ nil)

@spec feature_enabled?(module() | nil, atom(), atom() | nil) :: boolean()

Checks if a specific debug feature is enabled.

Link to this function

format_sql(sql, config)

@spec format_sql(String.t(), map()) :: String.t()

Formats SQL query based on configuration.

Link to this function

get_config(domain_module)

@spec get_config(module() | nil) :: map()

Gets the debug configuration for a domain. Falls back to defaults if domain doesn't implement debug_config/0.

Link to this function

get_default_config()

@spec get_default_config() :: map()

Gets the default debug configuration. Can be overridden via application config.

Link to this function

get_view_config(domain_module, view_type)

@spec get_view_config(module() | nil, atom()) :: map()

Gets configuration for a specific view type.

Link to this function

truncate_params(params, config)

@spec truncate_params(list(), map()) :: list()

Truncates parameters based on configuration.