API Reference Ramal v#0.2.0

Copy Markdown View Source

Modules

Data branches as BEAM processes.

Aggregates for Ramal.aggregate/4: a pure computation over a list of records, and the delta path that uses it.

A branch: the struct a branch process holds and storage persists, plus the pure functions over it.

The change Ramal.Resource installs on every create, update and destroy action.

One row-level difference between a branch and its base, as Ramal.diff/1 returns it.

The error every Ramal function returns as {:error, %Ramal.Error{}}.

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.

What Ramal.merge/2 returns on success.

The overlay: what a branch changed, as a plain map.

The read preparation Ramal.Resource installs on every read action.

The Spark extension that makes an Ash resource branchable.

Where branches are kept while no process holds them.

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).

Keeps branches in an ETS table owned by Ramal.Supervisor. The default backend in tests and development.

Keeps branches in the ramal_branches table of the host's Postgres, so they survive a restart.

The supervision tree of Ramal. Add it to the host application's tree

The telemetry events Ramal emits, in one place.

Mix Tasks

Writes a migration that creates the ramal_branches table Ramal.Storage.Postgres uses.