This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-23
Channels
- # admin-announcements (1)
- # alda (1)
- # bangalore-clj (5)
- # beginners (17)
- # boot (392)
- # capetown (4)
- # cider (16)
- # cljs-dev (24)
- # cljsrn (33)
- # clojure (106)
- # clojure-berlin (1)
- # clojure-nl (1)
- # clojure-russia (168)
- # clojure-spec (85)
- # clojure-uk (137)
- # clojurescript (83)
- # clojutre (4)
- # component (10)
- # cursive (6)
- # datavis (9)
- # datomic (11)
- # defnpodcast (15)
- # dirac (4)
- # docker (1)
- # ethereum (1)
- # hoplon (27)
- # jobs (5)
- # jobs-rus (1)
- # lein-figwheel (2)
- # luminus (5)
- # off-topic (5)
- # om (13)
- # onyx (60)
- # parinfer (2)
- # planck (12)
- # proton (2)
- # re-frame (45)
- # rethinkdb (5)
- # ring-swagger (9)
- # spacemacs (9)
- # specter (49)
- # test-check (1)
- # untangled (104)
- # yada (10)
@nxqd: Datomic has no concept of a "missing fact", so there is no direct way to include keys in entities that are not present with a value. You need to be aware that any entity can have any attribute attached. There are not "entity types" which would restrict the possible attributes to a certain set.
@nxqd: What this means is that Datomic can't do it for you, but you can certainly do it yourself in your data layer which sits between your application and datomic.
@nxqd: I've used a similar query to this (not with nil in my case). Maybe it will work:
(or (and [(missing? $ ?entity :some/attribute)]
[(identity nil) ?value])
[?entity :some/attribute ?value])
@nxqd: Also, there's get-else (http://docs.datomic.com/query.html#get-else) and pull default expressions (http://docs.datomic.com/pull.html#default-expressions)
I've always had the impression that the rest api service counts as a normal licensed peer - is this correct?
Is it possible to use a lookup ref instead of entity id in :db.fn/cas? Or even better, a temporary id (negative) in the same transaction that asserts a :unique/identity attribute and the :db/id? Also, what if entity has two identity attributes in the same transaction, one matches and the other doesn't? Does it resolve entity ID by the first one in the transaction sequence?
@yonatanel cool, those seem to be what I need.