This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-19
Channels
- # adventofcode (36)
- # asami (3)
- # babashka (22)
- # beginners (65)
- # calva (5)
- # clj-kondo (1)
- # cljs-dev (3)
- # clojure-europe (1)
- # clojurescript (3)
- # conjure (1)
- # core-async (6)
- # datomic (3)
- # emacs (4)
- # introduce-yourself (3)
- # juxt (11)
- # lsp (64)
- # malli (10)
- # missionary (11)
- # music (1)
- # off-topic (2)
- # pathom (1)
- # practicalli (1)
- # reagent (6)
- # reitit (3)
- # releases (3)
- # xtdb (9)
Is it a good pattern to have a "entity_type" attribute to help differentiate types of entities?
it is a known pattern. in general it would be advisable to call it :
or something else distinct
I use xtdb with fulcro and tend to duplicate the :xt/id
into :foo/id
where foo
is the type
Thank you both! I also found a mention in faq: Modeling Types https://docs.xtdb.com/resources/faq/
I realize my prodding is no doubt getting silly at this granularity, but @U3N4R4TLK if you are willing, it would be wonderful to have this question asked on http://discuss.xtdb.com, since it comes up reasonably often. It would be even more wonderful if @U3JH98J4R and/or @U49U72C4V could carbon copy their replies into Discourse. 😉 Apologies for the hassle and, as always, I completely understand if people don't want to do this. No obligation. 🙏
I know XTDB doesn't support unification on the attribute. Is it a good idea to pass an attribute "dynamically" while building the edn of the query? For example:
'{:find [(pull ?e [*])]
:in [?value]
:where [[?e ~attribute ?value]]}