Welcome! Please see the About page for a little more info on how this works.

+3 votes
in Peer API by

It appears that only the client API currently supports :limit and :offset. Are there plans to support these options in the on-prem index-pull API?

1 Answer

+2 votes
by

As on-prem runs "in-memory" on JVM, you can simply drop/take the return of index-pull, with the same coast as it was implement internally.

by
I think native support for `:offset` at least would be (much) faster. With `drop`, the pull pattern id pulled for all dropped entities, which is more expensive than just walking the index without pulling anything.

When walking the index forward, that's not an issue, because you can use `d/datoms` instead, of `d/index-pull`, but you need `d/index-pull` to be able to walk the index in reverse.
by
According to the official docs for on-prem (1) both `limit` and `offset` is supported. I think this should either be corrected or the implementation fixed according to the docs.

1: https://docs.datomic.com/on-prem/query/index-pull.html
...