Bolty.Response (Bolty v0.0.12)

Copy Markdown

The result of a single Bolt RUN/PULL exchange returned by Bolty.query/4 and friends.

Fields:

  • results — row-major list of %{field => value} maps; what you usually want.
  • fields — list of returned field names in column order.
  • records — untransformed column-major rows, parallel to fields.
  • plan, profile, stats, notifications, type, bookmark — server metadata from the trailing SUCCESS message; shapes follow the Bolt protocol.

Implements Enumerable over resultsEnum.map/2, Enum.count/1, and for comprehensions all work. Use Bolty.Response.first/1 for the common single-row case.

Summary

Types

acc()

@type acc() :: any()

element()

@type element() :: any()

key()

@type key() :: any()

t()

@type t() :: %Bolty.Response{
  bookmark: String.t(),
  fields: list(),
  notifications: list(),
  plan: map(),
  profile: any(),
  records: list(),
  results: list(),
  stats: list() | map(),
  type: String.t()
}

value()

@type value() :: any()

Functions

first(response)

new(arg)