# `Slap.SlateDB.Snapshot`
[🔗](https://github.com/mjrusso/slap/blob/slap_slatedb-v0.2.0/slap_slatedb/lib/slap/slatedb/snapshot.ex#L1)

A consistent, read-only view of the database at the time it was taken.

Create one with `Slap.SlateDB.snapshot/1`. Writes made after the snapshot are
not visible through it.

# `t`

```elixir
@opaque t()
```

# `get`

```elixir
@spec get(t(), binary(), keyword()) ::
  {:ok, binary() | nil} | {:error, Slap.SlateDB.Error.t()}
```

Reads `key` as of the snapshot. Takes the options of `Slap.SlateDB.get/3`.

# `get_key_value`

```elixir
@spec get_key_value(t(), binary(), keyword()) ::
  {:ok, Slap.SlateDB.key_value() | nil} | {:error, Slap.SlateDB.Error.t()}
```

Reads `key` with its metadata as of the snapshot, like
`Slap.SlateDB.get_key_value/3`.

# `iterator`

```elixir
@spec iterator(t(), keyword()) ::
  {:ok, Slap.SlateDB.Iterator.t()} | {:error, Slap.SlateDB.Error.t()}
```

Opens a `Slap.SlateDB.Iterator` as of the snapshot. Takes the options of `Slap.SlateDB.iterator/2`.

# `scan`

```elixir
@spec scan(t(), keyword()) :: Enumerable.t()
```

Scans rows as of the snapshot. Takes the same options as `Slap.SlateDB.scan/2`.

---

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