{"id":13508802,"url":"https://github.com/Nebo15/ecto_paging","last_synced_at":"2025-03-30T11:32:49.770Z","repository":{"id":57493496,"uuid":"70993578","full_name":"Nebo15/ecto_paging","owner":"Nebo15","description":"Cursor-based pagination for Ecto.","archived":false,"fork":false,"pushed_at":"2020-03-03T15:29:19.000Z","size":85,"stargazers_count":14,"open_issues_count":8,"forks_count":6,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-03-14T19:03:48.068Z","etag":null,"topics":["cursor","ecto","elixir","elixir-lang","hex","package","pagination"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nebo15.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-15T14:45:30.000Z","updated_at":"2023-08-22T00:30:43.000Z","dependencies_parsed_at":"2022-08-28T13:53:33.037Z","dependency_job_id":null,"html_url":"https://github.com/Nebo15/ecto_paging","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nebo15%2Fecto_paging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nebo15%2Fecto_paging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nebo15%2Fecto_paging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nebo15%2Fecto_paging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nebo15","download_url":"https://codeload.github.com/Nebo15/ecto_paging/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246314013,"owners_count":20757453,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cursor","ecto","elixir","elixir-lang","hex","package","pagination"],"created_at":"2024-08-01T02:00:58.657Z","updated_at":"2025-03-30T11:32:49.346Z","avatar_url":"https://github.com/Nebo15.png","language":"Elixir","funding_links":[],"categories":["ORM and Datamapping"],"sub_categories":[],"readme":"# Ecto.Paging\n\n[![Deps Status](https://beta.hexfaktor.org/badge/all/github/Nebo15/ecto_paging.svg)](https://beta.hexfaktor.org/github/Nebo15/ecto_paging) [![Build Status](https://travis-ci.org/Nebo15/ecto_paging.svg?branch=master)](https://travis-ci.org/Nebo15/ecto_paging) [![Coverage Status](https://coveralls.io/repos/github/Nebo15/ecto_paging/badge.svg?branch=master)](https://coveralls.io/github/Nebo15/ecto_paging?branch=master)\n\nThis module provides a easy way to apply cursor-based pagination to your Ecto Queries.\n\n## Usage:\n\n  1. Add macro to your repo\n\n     ```elixir\n     defmodule MyRepo do\n        use Ecto.Repo, otp_app: :my_app\n        use Ecto.Paging.Repo # This string adds `paginate/2` and `page/3` methods.\n      end\n     ```\n\n  2. Paginate!\n\n     ```elixir\n     query = from p in Ecto.Paging.Schema\n\n     {res, next_paging} = query\n     |\u003e Ecto.Paging.TestRepo.page(%Ecto.Paging{limit: 150})\n     ```\n\n## Limitations:\n\n  * Right now it works only with schemas that have `:inserted_at` field with auto-generated value.\n  * You need to be careful with order-by's in your queries, since this feature is not tested yet.\n  * It doesn't construct `has_more` and `size` counts in `paginate` struct (TODO: add this helpers).\n  * When both `starting_after` and `ending_before` is set, only `starting_after` is used.\n\n## Installation\n\n  1. Add `ecto_paging` to your list of dependencies in `mix.exs`:\n\n    ```elixir\n    def deps do\n      [{:ecto_paging, \"~\u003e 0.8.4\"}]\n    end\n    ```\n\n  2. Ensure `ecto_paging` is started before your application:\n\n     ```elixir\n     def application do\n       [applications: [:ecto_paging]]\n     end\n     ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNebo15%2Fecto_paging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNebo15%2Fecto_paging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNebo15%2Fecto_paging/lists"}