# `Lotus.Result`
[🔗](https://github.com/elixir-lotus/lotus/blob/v1.0.0/lib/lotus/result.ex#L1)

Represents the result of a query execution.

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

# `t`

```elixir
@type t() :: %Lotus.Result{
  columns: [String.t()],
  command: String.t() | nil,
  duration_ms: non_neg_integer() | nil,
  meta: map(),
  num_rows: non_neg_integer() | nil,
  rows: [[term()]]
}
```

# `new`

Creates a new Result from columns and rows.

## Examples

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

# `to_encodable`

```elixir
@spec to_encodable(t()) :: map()
```

Returns a JSON-safe map representation of the result.

Normalizes all row values (UUID binaries, Dates, Decimals, etc.) using
`Lotus.Normalizer` so the output is safe for JSON encoding.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
