Lotus.QueryResult (Lotus v0.7.0)

View Source

Represents the result of a SQL query execution.

Contains the columns, rows, and metadata about the query result.

Summary

Functions

Creates a new QueryResult from columns and rows.

Types

t()

@type t() :: %Lotus.QueryResult{
  columns: [String.t()],
  num_rows: non_neg_integer(),
  rows: [[any()]]
}

Functions

new(columns, rows)

@spec new([String.t()], [[any()]]) :: t()

Creates a new QueryResult from columns and rows.

Examples

iex> Lotus.QueryResult.new(["name", "age"], [["John", 25], ["Jane", 30]])
%Lotus.QueryResult{
  columns: ["name", "age"],
  rows: [["John", 25], ["Jane", 30]],
  num_rows: 2
}