# `EctoContext.Paginator`
[🔗](https://github.com/exfoundry/ecto_context/blob/v0.1.0/lib/ecto_context/paginator.ex#L1)

Pagination result struct containing entries, total count, and page metadata.

Returned by the `paginate/2` function generated by `EctoContext`.
Holds the current page's entries along with computed fields like
`total_pages`, `has_next_page?`, and `has_previous_page?`.

# `t`

```elixir
@type t() :: %EctoContext.Paginator{
  entries: list(),
  has_next_page?: boolean(),
  has_previous_page?: boolean(),
  page: pos_integer(),
  per_page: pos_integer(),
  total: non_neg_integer(),
  total_pages: non_neg_integer()
}
```

# `new`

```elixir
@spec new(list(), non_neg_integer(), term(), term()) :: t()
```

Creates a new `Paginator` struct from query results.

Normalizes `page` and `per_page` (accepts integers or string integers)
and computes `total_pages`, `has_next_page?`, and `has_previous_page?`.

---

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