This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-21
Channels
- # announcements (4)
- # architecture (161)
- # autochrome-github (7)
- # babashka (61)
- # beginners (42)
- # calva (24)
- # cider (22)
- # clj-kondo (28)
- # cljs-dev (8)
- # clojure (88)
- # clojure-art (2)
- # clojure-dev (7)
- # clojure-europe (43)
- # clojure-germany (2)
- # clojure-nl (2)
- # clojure-uk (4)
- # clojurescript (32)
- # core-async (41)
- # cursive (32)
- # datahike (6)
- # datomic (9)
- # emacs (22)
- # events (2)
- # fulcro (10)
- # graphql (1)
- # nextjournal (16)
- # off-topic (9)
- # overtone (1)
- # pathom (16)
- # polylith (5)
- # quil (7)
- # rdf (1)
- # re-frame (7)
- # reagent (22)
- # releases (2)
- # remote-jobs (1)
- # reveal (12)
- # sci (1)
- # shadow-cljs (12)
- # specter (20)
- # sql (6)
- # tools-deps (21)
- # vim (26)
- # xtdb (10)
Is it possible to pull only one entity. I tried to do it, but it only works for multiple entities. This works but it returns a vector of enttities:
(def woo-order-id
'[:find [(pull ?id [*]) ...]
:in $ woo-order-id
:where
[?id :woo-order/id woo-order-id]])
1. This is something for pull
. (d/pull db ['*] [:woo-order/id woo-order-id])
2. You are using the collection find spec :find [?e ...]
, but you want to use the scalar pattern :find ?e .
https://docs.datomic.com/on-prem/query/query.html#find-specifications
Thanks @U4VT24ZM3 I was looking at the pull api only. I didnt think so far to go to the find clause 🙂 Thanks!!!
I successfully got datahike-jdbc working with the latest datahike + mysql 🎉 I noticed that there is only ever 1 one created in the konserve
table (after ~50 entities). What implications does this have when querying data, when the total stored size is greater than the amount of RAM? Maybe I need to add more data to see more rows.
Ah, ok after inserting more data, eventually more rows appeared in the table. I suppose what's stored in the db is the hitchhiker tree, and at some point it partitions itself.
Yup; That's the idea. It's just using the database as a kv store (which is what konserve abstracts over), and the hitchiker tree index is written out over that kv store.