query v0.3.0 Query.Result.Meta
Provides paging meta for our Query.Result.
Link to this section Summary
Functions
Creates a new meta map from a Query.Builder and data list
Link to this section Types
Link to this section Functions
Link to this function
new(builder, data \\ [])
new(Query.Builder.t(), list()) :: Query.Result.Meta.t()
Creates a new meta map from a Query.Builder and data list.
Parameters
- builder: A Query.Builder struct.
- data: Our data list.
Examples
iex> Query.Result.Meta.new(builder, data)
%{page: 1, page_total: 2, total: 2, total_pages: 1}