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

Context path steps for nested CDT operations.

Each helper returns one `{context_id, value}` pair that can be passed as
part of a `ctx` list to CDT helpers.

# `list_order`

```elixir
@type list_order() :: :unordered | :ordered
```

List order used when a context step creates a nested list.

`:unordered` creates a normal list. `:ordered` creates an ordered list.

# `map_order`

```elixir
@type map_order() :: :unordered | :key_ordered | :key_value_ordered
```

Map order used when a context step creates a nested map.

`:unordered` keeps no ordering, `:key_ordered` orders entries by key, and
`:key_value_ordered` orders by key and value.

# `step`

```elixir
@type step() :: {non_neg_integer(), term()}
```

A single nested-CDT navigation step.

# `t`

```elixir
@type t() :: [step()]
```

Nested CDT context path.

Pass this list as `ctx:` to CDT operation builders that support nested
collection access.

# `all_children`

```elixir
@spec all_children() :: step()
```

Navigate to every child of the current collection.

# `all_children_with_filter`

```elixir
@spec all_children_with_filter(Aerospike.Exp.t()) :: step()
```

Navigate to children of the current collection that match `expression`.

The expression is evaluated with Aerospike's built-in loop variables, such as
`Aerospike.Exp.int_loop_var(:value)`, bound to each candidate child.

# `from_base64`

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

Deserializes a Base64-encoded context path.

# `from_bytes`

```elixir
@spec from_bytes(binary()) :: t()
```

Deserializes MessagePack context bytes.

# `list_index`

```elixir
@spec list_index(integer()) :: step()
```

Navigate into a list by absolute index.

# `list_index_create`

```elixir
@spec list_index_create(integer(), list_order(), boolean()) :: step()
```

Navigate into a list by index, creating a nested list when it is missing.

`order` controls the created list order. When `pad` is `true` and `index` is
past the current end of the list, nil elements are inserted before the new
list.

# `list_rank`

```elixir
@spec list_rank(integer()) :: step()
```

Navigate into a list by rank.

# `list_value`

```elixir
@spec list_value(term()) :: step()
```

Navigate to the list element equal to `value`.

# `map_index`

```elixir
@spec map_index(integer()) :: step()
```

Navigate into a map by entry index.

# `map_key`

```elixir
@spec map_key(term()) :: step()
```

Navigate into the map entry for `key`.

# `map_key_create`

```elixir
@spec map_key_create(term(), map_order()) :: step()
```

Navigate into a map by key, creating a nested map when it is missing.

# `map_rank`

```elixir
@spec map_rank(integer()) :: step()
```

Navigate into a map by value rank.

# `map_value`

```elixir
@spec map_value(term()) :: step()
```

Navigate to the map entry whose value equals `value`.

# `to_base64`

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

Serializes a context path to Base64-encoded MessagePack bytes.

# `to_bytes`

```elixir
@spec to_bytes(t()) :: binary()
```

Serializes a context path to MessagePack bytes.

---

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