QuackDB.Result (quackdb v0.1.0)

Copy Markdown View Source

Normalized query result.

The shape mirrors what Ecto.Adapters.SQL expects from DBConnection-backed drivers: rows and num_rows are always present, while columns, connection_id, messages, and metadata keep Quack-specific result information available.

Summary

Types

command()

@type command() ::
  :select
  | :insert
  | :update
  | :delete
  | :create
  | :drop
  | :alter
  | :begin
  | :commit
  | :rollback
  | atom()

t()

@type t() :: %QuackDB.Result{
  columns: [String.t()] | nil,
  command: command() | nil,
  connection_id: String.t() | nil,
  messages: [map()] | nil,
  metadata: map(),
  num_rows: non_neg_integer(),
  rows: [[term()]] | nil
}

Functions

normalize(result)

@spec normalize(t()) :: t()