简体   繁体   中英

Retrieve all documents from ArangoDB collection, with an offset

Is there a way to retrieve all documents, but with an offset? or do I need to specify the amount of doucments i want?

For example:

LIMIT 5,"ALL" 

to retrieve all documents except the first 5.

There is no "all" option for limit but you can either:

  1. Put a large number as the second parameter if you have an idea of the max number records in the table

  2. Use the Minus function as follows:

.

FOR x IN MINUS (
    (FOR t IN test1
    RETURN t ),
    (FOR t IN test1 
    LIMIT 5
    RETURN t )
)
RETURN x

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM