# ancestry_ex v0.1.0 - API Reference

## Modules

- Core
  - [AncestryEx](AncestryEx.md): Organise the records of an Ecto schema as a tree (or a forest of trees)
using a materialized path column, like Ruby's
[ancestry](https://github.com/stefankroes/ancestry) gem.
  - [AncestryEx.Changeset](AncestryEx.Changeset.md): Changeset functions that keep the tree consistent.
  - [AncestryEx.Query](AncestryEx.Query.md): Query builders used by the functions that `use AncestryEx` defines in a schema.
  - [AncestryEx.Tree](AncestryEx.Tree.md): In-memory tree helpers. See `AncestryEx.arrange/1`,
`AncestryEx.arrange_serializable/2` and `AncestryEx.sort_by_ancestry/1`.

- Maintenance
  - [AncestryEx.Integrity](AncestryEx.Integrity.md): Maintenance functions: integrity checks and repairs, building the ancestry
column from an adjacency list (`parent_id`), and rebuilding caches.

- Internals
  - [AncestryEx.Config](AncestryEx.Config.md): Compile-time configuration of a schema that uses `AncestryEx`.
  - [AncestryEx.Format](AncestryEx.Format.md): Encoding of the ancestry column.

- Exceptions
  - [AncestryEx.IntegrityError](AncestryEx.IntegrityError.md): Raised by `AncestryEx.Integrity.check!/3`.

## Mix Tasks

- [mix ancestry_ex.gen.context](Mix.Tasks.AncestryEx.Gen.Context.md): Generates a context module with functions to work with a tree, along with
its schema and migration (see `mix ancestry_ex.gen.schema`).
- [mix ancestry_ex.gen.migration](Mix.Tasks.AncestryEx.Gen.Migration.md): Generates a migration that adds the ancestry column (and optional cache
columns) to an existing table.
- [mix ancestry_ex.gen.schema](Mix.Tasks.AncestryEx.Gen.Schema.md): Generates an Ecto schema that uses `AncestryEx`, and a migration creating
its table.

