# Ramal v0.2.0 - API Reference

## Modules

- [Ramal](Ramal.md): Data branches as BEAM processes.
- [Ramal.Aggregate](Ramal.Aggregate.md): Aggregates for `Ramal.aggregate/4`: a pure computation over a list of records, and the delta path that uses it.
- [Ramal.Branch](Ramal.Branch.md): A branch: the struct a branch process holds and storage persists, plus the pure functions over it.
- [Ramal.Capture](Ramal.Capture.md): The change `Ramal.Resource` installs on every create, update and destroy action.
- [Ramal.Change](Ramal.Change.md): One row-level difference between a branch and its base, as `Ramal.diff/1` returns it.
- [Ramal.Merge](Ramal.Merge.md): Merges a branch into the base: checks that the base did not move under the branch, then replays the branch's log
through the application's real actions inside one transaction.
- [Ramal.Merge.Result](Ramal.Merge.Result.md): What `Ramal.merge/2` returns on success.
- [Ramal.Overlay](Ramal.Overlay.md): The overlay: what a branch changed, as a plain map.
- [Ramal.Preparation](Ramal.Preparation.md): The read preparation `Ramal.Resource` installs on every read action.
- [Ramal.Resource](Ramal.Resource.md): The Spark extension that makes an Ash resource branchable.
- [Ramal.Storage](Ramal.Storage.md): Where branches are kept while no process holds them.
- [Ramal.Storage.Codec](Ramal.Storage.Codec.md): Turns a branch into a JSON-safe map and back, for storage backends that keep text (`Ramal.Storage.Postgres` keeps it
in a `jsonb` column).
- [Ramal.Storage.ETS](Ramal.Storage.ETS.md): Keeps branches in an ETS table owned by `Ramal.Supervisor`. The default backend in tests and development.
- [Ramal.Storage.Postgres](Ramal.Storage.Postgres.md): Keeps branches in the `ramal_branches` table of the host's Postgres, so they survive a restart.
- [Ramal.Supervisor](Ramal.Supervisor.md): The supervision tree of Ramal. Add it to the host application's tree
- [Ramal.Telemetry](Ramal.Telemetry.md): The telemetry events Ramal emits, in one place.

- Exceptions
  - [Ramal.Error](Ramal.Error.md): The error every Ramal function returns as `{:error, %Ramal.Error{}}`.

## Mix Tasks

- [mix ramal.gen.migration](Mix.Tasks.Ramal.Gen.Migration.md): Writes a migration that creates the `ramal_branches` table `Ramal.Storage.Postgres` uses.

