Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Arangodb pagination with AQL /_api/cursor instead of /_api/simple/all

Tags:

arangodb

aql

Arangodb has a LIMIT and SKIP function for simple queries, how would one implement using /api/cursor

FOR product in products
    LIMIT 2
return product

Ideally something like

FOR product in products
    LIMIT 20 SKIP 10
return product

Or it this only support using /_api/simple/all calls

like image 378
isawk Avatar asked Oct 18 '25 16:10

isawk


1 Answers

Think I figured it out, the LIMIT clause has an offset, count, that can be used to skip and implement pagination.

LIMIT @offset, @count

FOR product in products
    LIMIT 2, 10
return product
like image 91
isawk Avatar answered Oct 22 '25 07:10

isawk