# `TdsCdc.Change`

Represents a single change event captured from SQL Server CDC.

Each change contains the operation type, the row data after the change,
and metadata about the change such as the LSN and transaction order.

# `operation`

```elixir
@type operation() :: :insert | :update | :delete
```

# `t`

```elixir
@type t() :: %TdsCdc.Change{
  capture_instance: String.t(),
  commit_lsn: String.t() | nil,
  data: map(),
  lsn: String.t(),
  lsn_prev: String.t() | nil,
  operation: operation(),
  seqval: String.t(),
  transaction_order: non_neg_integer() | nil
}
```

# `from_row`

```elixir
@spec from_row(String.t(), map()) :: t()
```

Parses a raw CDC row from SQL Server into a `%Change{}` struct.

Expects a map with string keys as returned by `Tds` queries, including
the standard CDC columns: `__$operation`, `__$start_lsn`, `__$seqval`,
`__$update_mask`, and the tracked table columns.

---

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