Perform query with :limit (java)

Hi,
I’m trying to perform a query (with Peer.qseq) and supply a :limit and :offset

I tried all kinds of variations of calling Peer.qseq, but keep getting the exception ‘no :find clause specified’.

Is there any example how to do this? Documentation on :limit and :offset is very thin.

Some things I tried that I thought should work:
Peer.query( map(":query", “[:find ?e :in $ :where [?e :db/doc _]]”,":args", list(db), “:limit”,100))

Also tried by replacing “:query” with Util.read(":query") and converting the query to map-form, but no success.

qseq takes a query in the same form as q and query, none of which support :limit or :offset. qseq is eager in evaluating the result set, and only lazy when transforming the result set, e.g. with a pull expression in :find. Also, since query results aren’t ordered, limit and offset don’t have much meaning. Perhaps you’d find what you need in index-pull? Since that works against a single index, order is well defined and you can efficiently seek into the middle of an index by value. I believe that :limit and :offset offered by that API are relatively naive, but you can use the index :start itself to efficiently find a starting point.