# `ToonEx.Btoon.ObjectTable`
[🔗](https://github.com/ohhi-vn/toon_ex/blob/v1.6.0/lib/toon_ex/btoon/types.ex#L192)

A columnar table of homogeneous numeric columns (tag `0x0D`).

An object table is the binary equivalent of the TOON tabular array form:
each column holds the raw buffer for one field, decoded in bulk. Decoding
with `typed_arrays: :views` returns this struct; otherwise rows are
materialised as a list of maps.

## Examples

    iex> table = Btoon.ObjectTable.from_rows([%{"x" => 1, "y" => 2.5}, %{"x" => 3, "y" => 4.5}])
    iex> Btoon.ObjectTable.rows(table)
    [%{"x" => 1, "y" => 2.5}, %{"x" => 3, "y" => 4.5}]

# `t`

```elixir
@type t() :: %ToonEx.Btoon.ObjectTable{
  columns: [ToonEx.Btoon.ObjectTable.Column.t()],
  row_count: non_neg_integer()
}
```

# `columns`

```elixir
@spec columns(t()) :: [ToonEx.Btoon.ObjectTable.Column.t()]
```

Returns the column definitions.

# `from_rows`

```elixir
@spec from_rows([%{optional(String.t()) =&gt; term()}]) :: t()
```

Builds an object table from a list of maps. All maps must share the same
keys and every column must be homogeneous numeric (`Btoon.Types.encodable`).

# `row_count`

```elixir
@spec row_count(t()) :: non_neg_integer()
```

Row count of the table.

# `rows`

```elixir
@spec rows(t()) :: [%{optional(String.t()) =&gt; term()}]
```

Materialises the table as a list of maps.

---

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