Scrivener.__using__
You're seeing just the macro
__using__
, go back to Scrivener module for more information.
Scrivener is meant to be use
d by a module.
When use
d, an optional default for page_size
can be provided. If page_size
is not provided a default of 10 will be used.
A max_page_size
can also optionally can be provided. This enforces a hard ceiling for the page size, even if you allow users of your application to specify page_size
via query parameters. If not provided, there will be no limit to page size.
defmodule MyApp.Module do
use Scrivener
end
defmodule MyApp.Module do
use Scrivener, page_size: 5, max_page_size: 100
end
When use
is called, a paginate
function is defined in the module. See the Scrivener.Paginater
protocol documentation for more information.