This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-02
Channels
Hi. How do I limit my query with datalevin? I searched for a while, and found this:
(d/q {:query '[:find ?c ?n :where [?c :my-thing/its-attribute ?n]]
:offset 1
:limit 10
:args [(d/db conn)]})
But it seems like something Datomic specific. I tried this:
(->> (d/q '[:find ?eid
:where [?eid _ _]]
db)
(take 2)
(seq)
(flatten)
(d/pull-many db '[*]))
And it kind of works, but feel wrong to me somehow. (d/q ...)
is going to pull all the ids over, and it might cause a memory problem.
Does anyone have any suggestion for me? Thanks for the great work, by the way!We will implement these after https://github.com/juji-io/datalevin/issues/108 is finished.
🙌 2