This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-07-12
Channels
- # aleph (5)
- # announcements (1)
- # asami (29)
- # babashka (2)
- # beginners (36)
- # biff (1)
- # cider (6)
- # clj-kondo (29)
- # clj-together (5)
- # clojars (21)
- # clojure (11)
- # clojure-austin (5)
- # clojure-czech (1)
- # clojure-europe (23)
- # clojure-hk (1)
- # clojure-italy (1)
- # clojure-nl (1)
- # clojure-uk (1)
- # clojurescript (38)
- # clojurewerkz (1)
- # cursive (10)
- # data-science (2)
- # datalevin (15)
- # datomic (8)
- # duct (5)
- # emacs (36)
- # events (4)
- # fulcro (7)
- # garden (1)
- # gratitude (1)
- # interop (4)
- # introduce-yourself (1)
- # leiningen (1)
- # missionary (3)
- # music (3)
- # nbb (4)
- # off-topic (21)
- # polylith (6)
- # remote-jobs (5)
- # shadow-cljs (19)
- # specter (4)
- # xtdb (4)
What’s the main entity ID? :db/id
or :db/ident
?
I’m having a bit of an issue with clear command:
(d/clear conn)
Execution error (ExceptionInfo) at datalevin.client/normal-request (client.clj:338).
Request to Datalevin server failed: "No implementation of method: :clear-dbi of protocol: #'datalevin.lmdb/ILMDB found for class: datalevin.storage.Store"
BTW I see some functions require that you pass instance of ILMDB, how do I get one from connection? e.g. get-range
requires one
KV and datalog are different API, I do not expect one to access the underlying kv stores of a datalog DB
oh didn’t realize I was calling the wrong function
Another weird behaviour I’ve seen:
(d/q '[:find (pull ?e [*]) :in $ :where [?e]] (d/db conn))
=> ([{:db/id 14, :name "Rok"}])
;; now I retract attribute via entity
(-> (d/entity @conn 14) d/touch (dissoc :name))
=> {:name "Rok", :db/id 14, :<STAGED> {:name [{:op :dissoc}]}}
;; and I do a transact
(d/transact! conn [*1])
=> {:datoms-transacted 1}
;; 1 datom was affected, I would expect the data to be gone, but it isn't
(d/q '[:find (pull ?e [*]) :in $ :where [?e]] (d/db conn))
=> ([{:db/id 14, :name "Rok"}])
;; but if I just do the same thing a second time, the data is gone
(-> (d/entity @conn 14) d/touch (dissoc :name))
=> {:db/id 14, :<STAGED> {:name [{:op :dissoc}]}}
(d/transact! conn [*1])
=> {:datoms-transacted 0}
(d/q '[:find (pull ?e [*]) :in $ :where [?e]] (d/db conn))
=> ()
I assumed that it staged retractions
what is the prefered way to delete an entity?
thanks