# `AshReplicant.Checkpoint`
[🔗](https://github.com/baselabs/ash_replicant/blob/v0.3.0/lib/ash_replicant/checkpoint.ex#L1)

`use AshReplicant.Checkpoint, repo: MyApp.Repo, domain: MyApp.Domain` generates the
bundled AshPostgres checkpoint resource (table `ash_replicant_checkpoints`) bound to
the host's repo and domain.

One row per replication slot: `slot_name` (primary key) and the durable `commit_lsn`
watermark. The sink upserts it in the same transaction as the mirrored changes, which
is what gives effect-once (dup = 0) semantics.

A macro is required because an AshPostgres resource needs its host `repo` at compile
time; `ash_replicant` cannot hardcode it.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
