# `QuackDB.Protocol.LogicalType`
[🔗](https://github.com/elixir-vibe/quackdb/blob/main/lib/quack_db/protocol/logical_type.ex#L1)

Decoder and metadata helpers for DuckDB logical types.

Maps Quack logical type ids to names, derives physical storage types, and
exposes nested type metadata used by vector decoding.

# `id`

```elixir
@type id() :: non_neg_integer()
```

# `t`

```elixir
@type t() :: %QuackDB.Protocol.LogicalType{
  id: id(),
  name: atom() | nil,
  type_info: map() | nil
}
```

# `array_size`

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

# `child_type`

```elixir
@spec child_type(t()) :: t()
```

# `decode`

```elixir
@spec decode(binary()) :: QuackDB.Protocol.Reader.read_result(t())
```

# `fixed_size`

```elixir
@spec fixed_size(atom()) :: pos_integer()
```

# `fixed_size?`

```elixir
@spec fixed_size?(atom()) :: boolean()
```

# `id`

```elixir
@spec id(atom()) :: id()
```

# `name`

```elixir
@spec name(id()) :: atom() | nil
```

# `physical_type`

```elixir
@spec physical_type(t()) :: atom()
```

# `struct_children`

```elixir
@spec struct_children(t()) :: [%{name: String.t(), type: t()}]
```

---

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