Tursox.Result (tursox v0.2.1)

Copy Markdown View Source

Ordered result metadata for statement execution and explicit materialization.

Rows are lists, never maps by default, so column order and duplicate names are preserved.

Summary

Functions

Explicitly converts ordered rows to maps using a duplicate-name policy.

Types

t()

@type t() :: %Tursox.Result{
  columns: [Tursox.Column.t()] | nil,
  last_insert_rowid: integer() | nil,
  num_rows: non_neg_integer(),
  rows: [[term()]] | nil
}

Functions

to_maps(result, policy \\ :error)

@spec to_maps(t(), :first | :last | :error) ::
  {:ok, [map()]} | {:error, Tursox.Error.t()}

Explicitly converts ordered rows to maps using a duplicate-name policy.