This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-11-10
Channels
- # admin-announcements (1)
- # aleph (1)
- # asami (9)
- # babashka (30)
- # beginners (83)
- # calva (8)
- # cherry (4)
- # cider (4)
- # clj-kondo (15)
- # cljs-dev (11)
- # cljsrn (8)
- # clojure (85)
- # clojure-europe (87)
- # clojure-losangeles (9)
- # clojure-nl (4)
- # clojure-norway (4)
- # clojure-spec (3)
- # clojurescript (12)
- # community-development (5)
- # conjure (1)
- # core-typed (3)
- # datomic (21)
- # docker (13)
- # emacs (13)
- # funcool (1)
- # google-cloud (1)
- # graalvm (12)
- # gratitude (14)
- # holy-lambda (6)
- # introduce-yourself (18)
- # lsp (15)
- # malli (6)
- # matcher-combinators (15)
- # nbb (15)
- # off-topic (37)
- # pathom (31)
- # portal (23)
- # rdf (3)
- # releases (2)
- # reveal (2)
- # sci (4)
- # scittle (3)
- # shadow-cljs (14)
- # squint (2)
- # tools-deps (29)
You’ve probably done it by now, but you can see me using it in one of the tests: https://github.com/quoll/asami/blob/6b8c0fb68ba734f968a3e5906d338cfd6b49e2a6/test/asami/api_test.cljc#L510
Incidentally, you’ll see that queries can have those values inside the query, like on line 533:
[:find ?aka :where [?e :db/ident [:maksim 45]] [?e :aka ?a] [?a :a/contains ?aka]]
Triples can always be inserted with structures in them, but generally you’d be doing that kind of thing with entities. For now, if an entity sees a structure then it decomposes it into triples. That’s what you usually want, but not always.
What I’ve opted for right now is that objects will be inserted as whole values if it’s a :db/ident
or :id
key. Otherwise, they will be deconstructed into triples