This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-12-21
Channels
- # adventofcode (82)
- # bangalore-clj (1)
- # beginners (44)
- # boot (7)
- # boot-dev (25)
- # cider (1)
- # cljs-dev (3)
- # cljsrn (14)
- # clojars (11)
- # clojure (210)
- # clojure-dusseldorf (4)
- # clojure-gamedev (2)
- # clojure-greece (11)
- # clojure-italy (6)
- # clojure-norway (6)
- # clojure-russia (6)
- # clojure-serbia (2)
- # clojure-spec (43)
- # clojure-sweden (1)
- # clojure-uk (77)
- # clojurescript (43)
- # cursive (1)
- # data-science (3)
- # datomic (32)
- # duct (3)
- # figwheel (2)
- # fulcro (71)
- # graphql (3)
- # hoplon (14)
- # jobs-discuss (3)
- # lambdaisland (1)
- # leiningen (2)
- # luminus (2)
- # lumo (14)
- # off-topic (16)
- # om-next (1)
- # perun (5)
- # random (1)
- # re-frame (19)
- # reagent (37)
- # ring-swagger (3)
- # shadow-cljs (157)
- # specter (6)
- # sql (29)
- # unrepl (14)
@luchini @daveeliepmann thank you and thank you. each tag can be authored by a different person. the reason i am keeping track of this is because: other users can "verify" a tag, which awards the original tagger a point. it's important to incentivize cooperative behavior in social platforms. I have a :tag/blurb and it sounds like you both agree I should put a schema property :blurb/tags with cardinality many... good idea and I agree.
You should avoid duplicating bi-directional relationships manually. You can always use the reverse notation :blurb/tags or :tag/blurb depending on your scenario
Hmm I didn't know I could do that. That's cool. So if I have :tag/blurb ... then :blurb/_tag would return many of them, even if tag/blurb was a cardinality one?
The way to reverse ir is to add _
to the keyword not to the namespace. So if you have a :tag/blurb
of cardinality one, a :tag/_blurb
will return you all tags that blurb has. It feels a bit upside down though (semantically speaking). You might just prefer to do :blurb/tags
with a many cardinality and use :blurb/_tags
to find all blurbs that have a certain tag.
is it possible to update a datomic attribute from unique/value
to unique/identity
via transacting new schema?
I just tried to do exactly that to a running datomic system, the schema attribute is listed as unique/identity
now, but when I try to do an upsert, I still get a unique conflict
.
I see from this table that it should be possible http://docs.datomic.com/schema.html#altering-schema-attributes. I'll keep investigating why I'm not seeing the behavior I expect
hmm, what's the easiest way to get datomic to unify with a constant value, for example in an or
clause to handle a missing value.
do you per chance know where I may read about that? for some reason its not working for me.
well I transact and it appears to succeed but then I run this query,
[:find ?attr ?type ?card
:in $
:where
[_ :db.install/attribute ?a]
[?a :db/valueType ?t]
[?a :db/cardinality ?c]
[?a :db/ident ?attr]
[?t :db/ident ?type]
[?c :db/ident ?card]]
might want to look at these schema queries: https://github.com/Datomic/day-of-datomic/blob/master/tutorial/schema_queries.clj