To page results in RethinkDB, you’ll want to sort the results, skip to the page you want, and limit the number of rows to the page size:
r.db('test')
.table('users')
.orderBy('last_name')
.skip(10)
.limit(10)
Here is an example result:
first_name
|
id
|
last_name
|
user_name
|
|
1
|
gary
|
72b719a2-0a96-4b54-aaba-63b76e5c3c75
|
sieling
|
gsieling
|
2
|
test
|
cb93de7e-2d91-48ce-956e-4090694e5cb9
|
test
|
test
|
3
|
test 1
|
02b2fa2b-7e50-43cc-a476-a14d3b4324ac
|
test 1
|
test
|
4
|
test 10
|
edabe8a9-b77e-4446-97aa-be9b7d542784
|
test 10
|
test 10
|
5
|
test 2
|
a86e769d-32fa-4853-9018-f8c360795304
|
test 2
|
test 2
|
6
|
test 3
|
bfff0d26-f1f1-4a07-9bb6-e54302c5ee05
|
test 3
|
test 3
|
7
|
test 4
|
d6c17523-8857-44c4-a014-12ac58764276
|
test 4
|
test 4
|
8
|
test 5
|
3e9345bf-a16b-4bcd-927f-0ff226bf3228
|
test 5
|
test 5
|
9
|
test 6
|
a31dd384-cd63-44c8-addd-cb81db15e278
|
test 6
|
test 6
|
10
|
test 7
|
d6503bb3-3e85-464e-9019-5beee03d1d9d
|
test 7
|
test 7
|