Fakultas Ilmu Komputer UI

Commit d9955733 authored by Muhammad Rafif Elfazri's avatar Muhammad Rafif Elfazri
Browse files

Remove module pagination with paginator

parent 9e23586c
defmodule Diskuy.Pagination do
@moduledoc """
This Pagination module works with table with default id column and and timestamps
alias Diskuy.Repo
def paginate_start(query) do
Repo.paginate(query, cursor_fields: [:inserted_at, :id])
def paginate_before(query, cursor_before) do
Repo.paginate(query, before: cursor_before, cursor_fields: [:inserted_at, :id])
def paginate_after(query, cursor_after) do
Repo.paginate(query, after: cursor_after, cursor_fields: [:inserted_at, :id])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment