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

A single Aerospike record returned by read operations.

Bin names in `bins` are always **strings** (wire format uses string bin names).

## Example

    %Aerospike.Record{
      key: some_key,
      bins: %{"name" => "Alice"},
      generation: 1,
      ttl: 3600
    }

# `bins`

```elixir
@type bins() :: %{required(String.t()) =&gt; term()}
```

Normalized record bins returned by reads.

Bin names are strings.

# `bins_input`

```elixir
@type bins_input() :: %{required(String.t() | atom()) =&gt; term()}
```

Bin map accepted by write APIs before normalization.

Bin names may be strings or atoms; atom names are converted to strings.

# `metadata`

```elixir
@type metadata() :: %{generation: non_neg_integer(), ttl: non_neg_integer()}
```

Record header metadata returned by successful writes or header-only reads.

`generation` is the server-side record generation. `ttl` is the
server-reported expiration value from the record header.

# `t`

```elixir
@type t() :: %Aerospike.Record{
  bins: bins(),
  generation: non_neg_integer(),
  key: Aerospike.Key.t(),
  ttl: non_neg_integer()
}
```

Record returned by read, operate, scan, and query APIs.

`ttl` is the server-reported expiration/TTL value carried in the record
header, using the same value returned by the Aerospike wire protocol.

---

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