Datom Range API Visualizer

Visualize how Datomic's datom range APIs (seek-datoms, rseek-datoms, index-pull, index-range, datoms) position in and iterate over indexes.

About the datom range APIs
seek-datoms (peer, guide) positions at the first datom ≥ seek key, iterates to the end. Unspecified trailing components use minimum-position sentinels: −∞ for ascending (E, A, V); +∞ for T (which sorts descending ↓, so the highest T value is first).
rseek-datoms (peer, guide) positions at the last datom ≤ rseek key, iterates to the start. Unspecified trailing components use maximum-position sentinels: +∞ for ascending (E, A, V); −∞ for T.
Rows returned by both functions are where the index range defined by the specified components lies. Neither function stops when component matching ends — callers supply their own termination logic.

index-pull (peer, client, guide) is a higher-level API that scopes iteration to a single attribute and returns pulled entities rather than raw datoms. It only works on :avet and :aevt, where A is the first component. The :start vector specifies A (required) plus an optional second component (V for :avet, E for :aevt). Unlike seek-datoms, it automatically stops at the end of the attribute's range — callers do not need to check when A changes. :reverse true switches to reverse iteration, analogous to rseek-datoms, starting from the last datom in the attribute range and iterating backward.
The pull subject is the third index component: E for :avet (A V E T), V for :aevt (A E V T). For :avet, A must be cardinality-many when V is unspecified. For :aevt, A must always be a cardinality-many ref (so V is an entity ID). (This visualizer does not model cardinality.)

index-range (peer, client, guide) returns datoms for a single attribute on :avet, bounded by an optional start V (inclusive) and end V (exclusive). Like index-pull, it is attribute-scoped and stops automatically at the end of the attribute's range. Unlike index-pull, it operates directly on datoms rather than pulling entities, has no reverse direction, and accepts only V bounds — not E or T.

datoms (peer, client, guide) is similar to seek-datoms: it positions at the first datom ≥ the seek key and iterates forward over all four indexes. Unlike seek-datoms, it automatically stops at the end of the specified leading-component range — callers do not need to check when the prefix changes. It has no reverse direction.

See also: Index Model.
Schema
identtypeindexedentity id

○ = value not present in any datom

forward key
reverse key
forward → end
reverse ← start
both