# `Capstan.Snapshot.Chunk`
[🔗](https://github.com/baselabs/capstan/blob/v1.3.1/lib/capstan/snapshot/chunk.ex#L1)

A transient, in-memory backfill chunk awaiting the advance gate.

`table` is the `{schema, table}` pair; `seq` the chunk sequence number; `g` the chunk's
EXACT GTID position string captured under the brief per-chunk `LOCK TABLES … READ` (a
provable lower bound on the chunk's read view); `rows` the materialized chunk rows (a
bounded list — at most one chunk is buffered at a time); `max_pk` the canonical PK of the
last row (the cursor advances to it when the chunk is emitted).

## Rule 1

`rows` and `max_pk` are row VALUES (user data). The `@derive {Inspect, only: [:table,
:seq, :g]}` renders only the structural identity and elides them, so an incidental inspect
of a buffered chunk can never surface a row value.

# `t`

```elixir
@type t() :: %Capstan.Snapshot.Chunk{
  g: String.t(),
  max_pk: term(),
  rows: [map()],
  seq: non_neg_integer(),
  table: {String.t(), String.t()}
}
```

---

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