This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-25
Channels
- # aleph (18)
- # announcements (7)
- # asami (18)
- # babashka (15)
- # babashka-sci-dev (79)
- # beginners (61)
- # calva (4)
- # clj-kondo (23)
- # cljfx (16)
- # cljs-dev (6)
- # clojure (63)
- # clojure-bay-area (3)
- # clojure-europe (33)
- # clojure-nl (1)
- # clojure-survey (4)
- # clojure-uk (5)
- # clojurescript (136)
- # conjure (1)
- # cursive (8)
- # datahike (7)
- # datalevin (1)
- # datomic (30)
- # emacs (10)
- # events (2)
- # figwheel (2)
- # fulcro (20)
- # google-cloud (1)
- # lsp (6)
- # luminus (4)
- # malli (5)
- # music (3)
- # nextjournal (1)
- # off-topic (9)
- # other-languages (3)
- # pathom (16)
- # polylith (34)
- # re-frame (14)
- # reagent (19)
- # releases (6)
- # sci (2)
- # shadow-cljs (33)
At this point, you need to delete all of its triples. Yes, I appreciate that isn't a great answer. I can certainly do something without a huge effort. But it doesn't exist because: • Asami is based on the OWA. This makes entity removal an unusual thing to do. Instead, removing individual statements usually makes more sense • Datomic (which introduced entities in this context) didn't have this function (I’m guessing it probably does now)
I have 2 use cases that I think need retraction/deletion.
I'm trying to model links between documents. right now, a document is keyed by the location on disk. e.g. {:db/ident "file:///Users/lilactown/note.md"}
the operations I think I need retraction for are:
• moving, which would delete the old node and create the new node
• deletion, which would delete the node
What do you mean by “moving”? Is it just changing the ident? If so, then that's just a special property for referring to the entity… you can update that property if you want
I am literally watching the file system and get events like
{:type :delete :path "/Users/lilactown/Code/dex/notes/foo"}
{:type :create :path "/Users/lilactown/Code/dex/notes/bar"}
when I rename a file. instead of trying to relate the two events, it's simpler for me to delete the entity that represented the foo
doc and ingest the bar
doc as a new entityAre these objects that show up in a stream, or are they things that you’re inserting into the database, and you’re seeing them as entities?
they're things that show up in a stream. I then load some metadata about them into the database related to their location and content
unrelated to deletion, I'm trying to add the links to each document as a vector. a link inside that vector would be an ident, e.g
{:db/ident "file:///Users/lilactown/Code/dex/notes/test-link.md"
:uri "/Users/lilactown/Code/dex/notes/test-link.md",
:type :local-file,
:format "markdown",
:links ["file:///Users/lilactown/Code/dex/notes/test.md"]}
however this doesn't seem to work well w.r.t. querying for "return the entities this document links to" etc.Is this because it's a linked list? The :tg/contains
property was introduced to make that easy. Or you could make it a set instead of a vector (assuming you have the data in edn and not json)
Yes, that’s a different structure. Data that is provided in a vector is treated as an “array”. You can see how these work and how to query the data https://github.com/threatgrid/asami/wiki/5.-Entity-Structure#arrays.