API Reference ancestry_ex v#0.1.0

Copy Markdown View Source

Modules

Organise the records of an Ecto schema as a tree (or a forest of trees) using a materialized path column, like Ruby's ancestry gem.

Changeset functions that keep the tree consistent.

Compile-time configuration of a schema that uses AncestryEx.

Encoding of the ancestry column.

Maintenance functions: integrity checks and repairs, building the ancestry column from an adjacency list (parent_id), and rebuilding caches.

Query builders used by the functions that use AncestryEx defines in a schema.

Mix Tasks

Generates a context module with functions to work with a tree, along with its schema and migration (see mix ancestry_ex.gen.schema).

Generates a migration that adds the ancestry column (and optional cache columns) to an existing table.

Generates an Ecto schema that uses AncestryEx, and a migration creating its table.