This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-19
Channels
- # announcements (9)
- # babashka (5)
- # babashka-sci-dev (23)
- # beginners (160)
- # calva (78)
- # cider (23)
- # clj-commons (2)
- # clj-kondo (5)
- # cljdoc (19)
- # cljs-dev (8)
- # clojure (54)
- # clojure-australia (1)
- # clojure-czech (2)
- # clojure-dev (17)
- # clojure-europe (8)
- # clojure-italy (8)
- # clojure-nl (2)
- # clojure-sg (3)
- # clojure-uk (4)
- # clojurescript (70)
- # community-development (8)
- # core-async (8)
- # cursive (7)
- # datahike (12)
- # datalog (22)
- # datomic (20)
- # events (1)
- # fulcro (43)
- # graalvm (92)
- # gratitude (5)
- # holy-lambda (77)
- # honeysql (1)
- # jobs (1)
- # lsp (111)
- # membrane (70)
- # nextjournal (13)
- # off-topic (73)
- # pathom (1)
- # polylith (8)
- # portal (32)
- # re-frame (3)
- # reagent (4)
- # reitit (5)
- # releases (2)
- # reveal (4)
- # xtdb (22)
On a side note, I am interested in seeing the raw Datom being created by Datahike through Datascript. Can someone point to some code to do just that? It would be nice to be able to roam around a datalog database the way one might in an sql database.
So, you mean converting Datahike datoms to DataScript? As for the implementation, it is inherited from DataScript and can be found here: https://github.com/replikativ/datahike/blob/development/src/datahike/datom.cljc#L91
Actually, I screwed up the request - I want to examine the raw data. If I open a file made by Datahike in textedit, it's mostly binary. I guess next up is to run the postgres example and just look at the table.
I think you're looking for the datoms
api: https://cljdoc.org/d/io.replikativ/datahike/0.3.6/api/datahike.api#datoms
You can also just query for [:find ?e ?a ?v :where [?e ?a ?v]]
, but that may not be as efficient; Datoms should probably be preferred.
It may print like that, but it should be an interable of tuples.
Hmm... I just ran a test of this, and not observing what you are. I see a set of tuple vectors, as expected.
(d/q
'[:find ?e ?a ?v
:where [?e ?a ?v]]
(d/db conn))))
;; => #{[...] ...}
How are you running?