AshReports.Info (ash_reports v0.1.0)

Introspection helpers for AshReports.

This module provides functions to retrieve report definitions and related information from domains that use the AshReports extension.

Summary

Functions

Gets all band names from all reports in the domain.

Gets all chart names from the domain.

Gets all parameter names from all reports in the domain.

Gets all variable names from all reports in the domain.

Gets a specific chart definition by name from the domain.

Gets all chart definitions from the domain.

Gets all driving resources used by reports in the domain.

Checks if a domain has a specific chart definition.

Checks if a domain has a specific report.

Gets a specific report by name from a domain.

Gets all reports for the given domain.

Functions

all_band_names(domain_or_dsl_state)

@spec all_band_names(Ash.Domain.t() | Spark.Dsl.t()) :: [atom()]

Gets all band names from all reports in the domain.

all_chart_names(domain_or_dsl_state)

@spec all_chart_names(Ash.Domain.t() | Spark.Dsl.t()) :: [atom()]

Gets all chart names from the domain.

all_parameter_names(domain_or_dsl_state)

@spec all_parameter_names(Ash.Domain.t() | Spark.Dsl.t()) :: [atom()]

Gets all parameter names from all reports in the domain.

all_variable_names(domain_or_dsl_state)

@spec all_variable_names(Ash.Domain.t() | Spark.Dsl.t()) :: [atom()]

Gets all variable names from all reports in the domain.

chart(domain_or_dsl_state, name)

@spec chart(Ash.Domain.t() | Spark.Dsl.t(), atom()) :: map() | nil

Gets a specific chart definition by name from the domain.

Looks up a chart definition across all chart types (bar, line, pie, area, scatter, gantt, sparkline) and returns the first match.

charts(domain_or_dsl_state)

@spec charts(Ash.Domain.t() | Spark.Dsl.t()) :: [map()]

Gets all chart definitions from the domain.

Returns all standalone chart definitions (bar charts, line charts, pie charts, area charts, scatter charts, gantt charts, and sparklines) defined at the reports level.

driving_resources(domain_or_dsl_state)

@spec driving_resources(Ash.Domain.t() | Spark.Dsl.t()) :: [atom()]

Gets all driving resources used by reports in the domain.

has_chart?(domain_or_dsl_state, name)

@spec has_chart?(Ash.Domain.t() | Spark.Dsl.t(), atom()) :: boolean()

Checks if a domain has a specific chart definition.

has_report?(domain_or_dsl_state, name)

@spec has_report?(Ash.Domain.t() | Spark.Dsl.t(), atom()) :: boolean()

Checks if a domain has a specific report.

report(domain_or_dsl_state, name)

@spec report(Ash.Domain.t() | Spark.Dsl.t(), atom()) :: AshReports.Report.t() | nil

Gets a specific report by name from a domain.

reports(dsl_or_extended)

@spec reports(dsl_or_extended :: module() | map()) :: [struct()]
@spec reports(Ash.Domain.t() | Spark.Dsl.t()) :: [AshReports.Report.t()]

Gets all reports for the given domain.