MishkaDocument.Resources.Calculations.SectionMaintainers (Mishka Document v0.0.1)

Copy Markdown View Source

Calculates unique maintainers count for a section based on EventLog.

Maintainers are users who have successfully created or updated:

  • The section itself (direct changes)
  • Notes belonging to this section (via metadata.section_id)

Uses raw SQL for performance with large datasets: the database counts, one statement for the whole batch of sections. A section with a site_id counts only the events of its own site; a section with none (a master section) counts the events of every site. A section with no events counts 0.

Summary

Functions

describe(opts)

Callback implementation for Ash.Resource.Calculation.describe/1.

has_calculate?()

has_expression?()

Callback implementation for Ash.Resource.Calculation.has_expression?/0.

init(opts)

Callback implementation for Ash.Resource.Calculation.init/1.

strict_loads?()

Callback implementation for Ash.Resource.Calculation.strict_loads?/0.