View Source Dynamo.Key (Dynamo v0.2.0)

A resolved DynamoDB primary key for a table or index.

Produced by Dynamo.Schema.primary_key/1 and Dynamo.Schema.index_key/2; consumed by Dynamo.Request. pk/sk are DynamoDB attribute values (%{"S" => ...}), pk_name/sk_name the attribute names.

Summary

Functions

Renders the key as a DynamoDB Key map.

Types

t()

@type t() :: %Dynamo.Key{
  pk: map(),
  pk_name: String.t(),
  sk: map() | nil,
  sk_name: String.t() | nil
}

Functions

to_map(key)

@spec to_map(t()) :: map()

Renders the key as a DynamoDB Key map.