AshReports.Group (ash_reports v0.1.0)

Represents a grouping level for report data.

Groups define how data should be organized hierarchically in the report, with support for multi-level grouping.

Summary

Functions

Compares two values according to the group's sort order.

Creates a new Group struct with the given name and options.

Types

t()

@type t() :: %AshReports.Group{
  expression: Ash.Expr.t(),
  level: pos_integer(),
  name: atom(),
  sort: :asc | :desc
}

Functions

compare(group, val1, val2)

@spec compare(t(), any(), any()) :: :lt | :eq | :gt

Compares two values according to the group's sort order.

new(name, opts \\ [])

@spec new(atom(), Keyword.t()) :: t()

Creates a new Group struct with the given name and options.