Aerospike.Record (Aerospike Driver v0.3.1)

Copy Markdown View Source

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
}

Summary

Types

Normalized record bins returned by reads.

Bin map accepted by write APIs before normalization.

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

t()

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

Types

bins()

@type bins() :: %{required(String.t()) => term()}

Normalized record bins returned by reads.

Bin names are strings.

bins_input()

@type bins_input() :: %{required(String.t() | atom()) => term()}

Bin map accepted by write APIs before normalization.

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

metadata()

@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()

@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.