• Stars
    star
    14
  • Rank 1,389,066 (Top 29 %)
  • Language
    Elixir
  • License
    MIT License
  • Created over 7 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Cursor-based pagination for Ecto.

Ecto.Paging

Deps Status Build Status Coverage Status

This module provides a easy way to apply cursor-based pagination to your Ecto Queries.

Usage:

  1. Add macro to your repo

    defmodule MyRepo do
       use Ecto.Repo, otp_app: :my_app
       use Ecto.Paging.Repo # This string adds `paginate/2` and `page/3` methods.
     end
  2. Paginate!

    query = from p in Ecto.Paging.Schema
    
    {res, next_paging} = query
    |> Ecto.Paging.TestRepo.page(%Ecto.Paging{limit: 150})

Limitations:

  • Right now it works only with schemas that have :inserted_at field with auto-generated value.
  • You need to be careful with order-by's in your queries, since this feature is not tested yet.
  • It doesn't construct has_more and size counts in paginate struct (TODO: add this helpers).
  • When both starting_after and ending_before is set, only starting_after is used.

Installation

  1. Add ecto_paging to your list of dependencies in mix.exs:
```elixir
def deps do
  [{:ecto_paging, "~> 0.8.4"}]
end
```
  1. Ensure ecto_paging is started before your application:

    def application do
      [applications: [:ecto_paging]]
    end

More Repositories

1

sage

A dependency-free tool to run distributed transactions in Elixir, inspired by Sagas pattern.
Elixir
900
star
2

annon.api

Configurable API gateway that acts as a reverse proxy with a plugin system.
Elixir
329
star
3

confex

Useful helper to read and use application configuration from environment variables.
Elixir
295
star
4

ecto_mnesia

Ecto adapter for Mnesia Erlang term database.
Elixir
240
star
5

logger_json

JSON console backend for Elixir Logger.
Elixir
212
star
6

gandalf.api

Open-Source Decision Engine and Scoring Table for Big-Data.
PHP
98
star
7

multiverse

Elixir package that allows to add compatibility layers via API gateways.
Elixir
93
star
8

ecto_trail

EctoTrail allows to store Ecto changeset changes in a separate audit_log table.
Elixir
54
star
9

gandalf.web

Open-Source Decision Engine and Scoring Table for Big-Data.
JavaScript
45
star
10

renew

Mix task to create mix projects that builds into Docker containers.
Elixir
33
star
11

mouth

Simple adapter based SMS sending library
Elixir
29
star
12

rbmq

Simple API for spawning RabbitMQ Producers and Consumers.
Elixir
22
star
13

gen_task

Generic Task behavior that helps encapsulate errors and recover from them in classic GenStage workers.
Elixir
22
star
14

k8s-utils

Kubernetes utils for debugging our development or production environments
Shell
20
star
15

ael.api

Media content storage access control system based on Signed URL's.
Elixir
18
star
16

annon.web

Annon API Gateway Dashboard - manage API Gateway settings, review and replay requests from history.
JavaScript
11
star
17

bsoneach

Elixir package that applies a function to each document in a BSON file.
Elixir
9
star
18

jvalid

Json Scheme validation helper, that allows to store schemes in a separate files.
Elixir
8
star
19

man.api

Template Rendering Engine as a Service
Elixir
6
star
20

annon.infra

Infrastructure helpers for Annon API Gateway.
Shell
6
star
21

postboy.api

Asynchronous delivery service for Email or SMS messages.
Elixir
4
star
22

alpine-cassandra

Cassandra in Alpine Linux box.
Shell
4
star
23

eview

Nebo #15 Views for our Elixir API applications.
Elixir
4
star
24

mithril.api

Authentication and role management service.
Elixir
4
star
25

react-nebo15-events

Event Manager for application on React JS
JavaScript
4
star
26

lumen-intercom

Intercom service for lumen
PHP
3
star
27

annon.ktl

`annonktl` is a Annon API Gateway management CLI.
Elixir
3
star
28

man.web

Mรกn Templates Rendering Service
JavaScript
3
star
29

react-nebo15-validate

Validation module for React application by Nebo15
JavaScript
3
star
30

alpine-php

Linux Alpine container with PHP 5.6/7 and Mongo driver.
Shell
2
star
31

lumen-mandrill

PHP
2
star
32

alpine-erlang

Erlang container based on Alpine Linux with Kubernetes support.
Dockerfile
2
star
33

alpine-elixir

Alpine Box with Elixir and Erlang installed.
Dockerfile
2
star
34

react-nebo15-components

React components
JavaScript
2
star
35

alpine-postgre

PostgreSQL Docker Images based on Alpine Linux and with the same API as official repo has.
Shell
2
star
36

annon.status.web

Annon API Gateway Status Page - see statuses of the APIs from Annon API Gateway.
JavaScript
1
star
37

egndf

gndf.io client for Elixir
Elixir
1
star
38

d3-structure

๐Ÿจ Build your d3-graphics with data structures and one entrypoint!
JavaScript
1
star
39

mbank.lib.angular-compiled

Compiled version for Angular MBank libruary
JavaScript
1
star
40

nebo-error-messages

JavaScript
1
star
41

alpine-mongodb

Alpine container with MongoDB
Shell
1
star
42

react-boilerplate

Boilerplate for React Univeral application, that is using Redux, React-router and Express
JavaScript
1
star
43

d3-builder

JavaScript
1
star
44

gulp-by-path

Transform files grouped by file.relative
JavaScript
1
star
45

lumen-rest

PHP
1
star
46

nebo-localize

JavaScript
1
star
47

drunken-russian

Tasks manager for PHP and MongoDB. 100% alcohol free.
PHP
1
star
48

oxygen

Deprecated. Use Elixir Registry instead of this package.
Elixir
1
star
49

url-parser

URL Parser module
JavaScript
1
star
50

alpine-fluentd-elasticsearch

Alpine Box with Fluentd and ElasticSearch plugin
1
star
51

nebo-validate

JavaScript
1
star
52

onedayofmine.web

OneDayOfMine Project - it's our old and first unsupported startup, which we want to re-implement in future
PHP
1
star
53

javascript-library-boilerplate

Javascript Library Boilerplate
1
star
54

react-nebo15-currency-input

React currency input by Nebo15
JavaScript
1
star
55

credits4all.web.admin

Playground based on Parse.com
CSS
1
star
56

tokenizer.api

Card Tokenization Service
Elixir
1
star
57

dogstat

Elixir client for StatsD servers.
Elixir
1
star
58

alpine-postgre-backup

Backup system for PostgreSQL containers.
Shell
1
star
59

ci-utils

Continuous Integration scripts for different languages
1
star