Fork me on GitHub
#datalevin
<
2022-04-29
>
Kevin10:04:15

Hey there, probably a very silly question, but how do you remove a record by ID? I know you can remove fields from a record using (d/transact! conn [[:db/retract 1 :name "Frege"]]). But retracting the entire record by ID doesn't work: (d/transact! conn [[:db/retract 1]])

Cora (she/her)14:04:44

; retract all entity attributes (effectively deletes entity)
      (transact! conn [[:db.fn/retractEntity 1]])
I think that would work? it's in the transact! docstring

👍 3
Kevin16:04:13

Yes this works! Thank you very much 😄

clojure-spin 1