# `Aerospike.Cursor`
[🔗](https://github.com/luisgabrielroldan/aerospike_driver/blob/v0.3.1/lib/aerospike/cursor.ex#L1)

Opaque partition-resume cursor for paged queries.

Serialize with `encode/1` for storage or URLs; restore with `decode/1`.
The cursor captures partition progress, not a stable snapshot of the
result set.

# `t`

```elixir
@type t() :: %Aerospike.Cursor{
  partitions: [Aerospike.PartitionFilter.partition_entry()]
}
```

Partition resume cursor used by paged scans and queries.

Partition entries may carry the last digest and bval observed for each
partition so a later page can resume partition-order traversal.

# `decode`

```elixir
@spec decode(String.t()) :: {:ok, t()} | {:error, Aerospike.Error.t()}
```

Deserializes a cursor produced by `encode/1`.

Returns `{:error, %Aerospike.Error{code: :parse_error}}` when the string is
not valid cursor data.

# `encode`

```elixir
@spec encode(t()) :: String.t()
```

Serializes a cursor to a URL-safe Base64 string.

The encoded value is suitable for storage in application state or query
parameters. It is driver-owned data; callers should treat it as opaque.

Raises `ArgumentError` if the cursor contains invalid partition entries.

---

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