@@ -6,23 +6,23 @@ This module provides a easy way to apply cursor-based pagination to your Ecto Qu
6
6
7
7
## Usage:
8
8
9
- 1 . Add macro to your repo
9
+ 1 . Add macro to your repo
10
10
11
- ``` elixir
12
- defmodule MyRepo do
13
- use Ecto .Repo , otp_app: :my_app
14
- use Ecto .Paging .Repo # This string adds `paginate/2` and `page/3` methods.
15
- end
16
- ```
11
+ ``` elixir
12
+ defmodule MyRepo do
13
+ use Ecto .Repo , otp_app: :my_app
14
+ use Ecto .Paging .Repo # This string adds `paginate/2` and `page/3` methods.
15
+ end
16
+ ```
17
17
18
- 2 . Paginate !
18
+ 2 . Paginate!
19
19
20
- ```elixir
21
- query = from p in Ecto .Paging .Schema
20
+ ``` elixir
21
+ query = from p in Ecto .Paging .Schema
22
22
23
- {res, next_paging} = query
24
- |> Ecto .Paging .TestRepo .page (%Ecto .Paging {limit: 150 })
25
- ```
23
+ {res, next_paging} = query
24
+ |> Ecto .Paging .TestRepo .page (%Ecto .Paging {limit: 150 })
25
+ ```
26
26
27
27
## Limitations:
28
28
@@ -33,18 +33,18 @@ This module provides a easy way to apply cursor-based pagination to your Ecto Qu
33
33
34
34
## Installation
35
35
36
- 1 . Add `ecto_paging` to your list of dependencies in `mix.exs`:
36
+ 1 . Add ` ecto_paging ` to your list of dependencies in ` mix.exs ` :
37
37
38
- ```elixir
39
- def deps do
40
- [{:ecto_paging , " ~> 0.8.4" }]
41
- end
42
- ```
38
+ ``` elixir
39
+ def deps do
40
+ [{:ecto_paging , " ~> 0.8.4" }]
41
+ end
42
+ ```
43
43
44
- 2 . Ensure `ecto_paging` is started before your application:
44
+ 2 . Ensure ` ecto_paging ` is started before your application:
45
45
46
- ```elixir
47
- def application do
48
- [applications: [:ecto_paging ]]
49
- end
50
- ```
46
+ ``` elixir
47
+ def application do
48
+ [applications: [:ecto_paging ]]
49
+ end
50
+ ```
0 commit comments