This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-08-25
Channels
- # admin-announcements (18)
- # beginners (16)
- # boot (13)
- # bristol-clojurians (1)
- # cider (41)
- # clojure (116)
- # clojure-berlin (1)
- # clojure-italy (2)
- # clojure-japan (6)
- # clojure-russia (94)
- # clojurescript (46)
- # clojutre (5)
- # core-matrix (2)
- # cursive (1)
- # datascript (14)
- # datomic (10)
- # devops (73)
- # editors (3)
- # emacs (19)
- # hoplon (382)
- # jobs (1)
- # ldnclj (8)
- # ldnproclodo (4)
- # off-topic (50)
- # onyx (3)
- # reagent (2)
- # yada (19)
Using the raw indexes I can do db.datoms(AVET, :some/attribute) to get all the datoms with a particular attribute, sorted by V. I'd like the iterator to be reversed (i.e., from the largest V to the smallest). Is this possible?
@arohner: that seems nice and hacky, and kind of brilliant . Would only work for numeric values I suppose
How do people approach pagination in datomic? There’s no offset/limit in datalog and the datoms api doesn’t quite fit either.
datomic seems nice in principle because you could get the next “page” from the same db value.
@jonas: you can’t get pagination out of d/q, because it’s set-based. If you need iteration, you can look at d/datoms
, d/seek-datoms
and friends
those can also be faster than d/q in some cases, but obviously only reach for that tool when necessary
@arohner: yes, d/datoms would be perfect for my use case if I could get the reverse iterator.