RethinkDB pagination using slice or limit & skip with changes()
<p>How can i do pagination in RethinkDB with changes()?</p>

<p>None of these options does not work:</p>

<pre><code>r.db('bustest').table('client').orderBy({index: r.desc("id")}).slice(3, 3).changes()

r.db('bustest').table('client').orderBy({index: r.desc("id")}).skip(3).limit(3).changes()
</code></pre>

<p>Only it works:</p>

<pre><code>r.db('bustest').table('client').orderBy({index: r.desc("id")}).limit(3).changes()
</code></pre>

<p>UPDATE:</p>

<p>For example, skip after changes():</p>

<pre><code>r.db('bustest').table('client').orderBy({index: r.desc("id")}).limit(3).changes({squash: 0.05, includeInitial: true, includeStates: true})
</code></pre>

<p>return:</p>

<pre><code>{
"state":  "ready"
},
{
"new_val": {
"first_name":  "Gruzin" ,
"id":  "e9580339-b908-4349-a208-c3d1e25bf7ba" ,
"last_name":  "Bagal"
}
},
{
"new_val": {
"first_name":  "e31db5422cd74040" ,
"id":  "efadedd0-56f2-498f-ad04-5191e2be1244" ,
"last_name":  "27d6b3a140235275"
}
},
{
"new_val": {
"first_name":  "2ba4a9d0e3616865" ,
"id":  "f5c7f3b7-23d2-4661-a5b7-91b977635556" ,
"last_name":  "b7f4df90a27bb05b"
}
},
{
"state":  "initializing"
}
</code></pre>

<p>And with skip:</p>

<pre><code>r.db('bustest').table('client').orderBy({index: r.desc("id")}).limit(3).changes({squash: 0.05, includeInitial: true, includeStates: true}).skip(3)
</code></pre>

<p>return:</p>

<pre><code>{
"state":  "ready"
},
{
"new_val": {
"first_name":  "Gruzin" ,
"id":  "e9580339-b908-4349-a208-c3d1e25bf7ba" ,
"last_name":  "Bagal"
}
}
</code></pre>

<p>Skip after changes() didn't work. But pagination with changes() is very important part for my projects.</p>