Sofa.View.Row (sofa v0.8.1)

Copy Markdown View Source

One row of a view result. doc is set with include_docs: true.

Summary

Functions

A row from its JSON object. A doc becomes a %Sofa.Doc{}, a missing key an error.

Types

t()

@type t() :: %Sofa.View.Row{
  doc: Sofa.Doc.t() | nil,
  error: String.t() | nil,
  id: String.t() | nil,
  key: term(),
  value: term()
}

Functions

from_map(row)

@spec from_map(map()) :: t()

A row from its JSON object. A doc becomes a %Sofa.Doc{}, a missing key an error.