This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (6)
- # beginners (110)
- # calva (18)
- # clj-kondo (19)
- # cljs-dev (27)
- # clojars (10)
- # clojure (38)
- # clojure-art (2)
- # clojure-europe (13)
- # clojure-germany (1)
- # clojure-norway (26)
- # clojure-uk (2)
- # clojurescript (10)
- # conjure (9)
- # cursive (12)
- # data-science (3)
- # datomic (22)
- # emacs (8)
- # helix (9)
- # honeysql (18)
- # introduce-yourself (1)
- # jobs (1)
- # leiningen (8)
- # lsp (22)
- # missionary (9)
- # nbb (11)
- # off-topic (83)
- # pathom (5)
- # pedestal (4)
- # polylith (1)
- # portal (1)
- # re-frame (3)
- # reitit (15)
- # remote-jobs (1)
- # rum (4)
- # shadow-cljs (88)
- # specter (12)
- # testing (1)
- # vim (39)
I guess this is a semi-periodic check - do you guys plan to adapt Datomic Console for Datomic Cloud? Or, in particular Dev Local? I’d find it quite useful it it is around.
as far I understand,
REBL should be the final solution for "datomic cloud console"
We do not have plans for Console for Datomic Cloud currently, and suggest using REBL as mentioned above.
Datomic documentation is suggesting to use
:db/ident for enums (https://docs.datomic.com/on-prem/schema/schema-modeling.html#enums).
However, when talking about idents (https://docs.datomic.com/on-prem/schema/identity.html#idents) it does say that
> Idents should not be used as unique names or ids on ordinary domain entities. Such entity names should be implemented with a domain-specific attribute that is a unique identity.
This last advice is also backed by the fact that idents are in a special cache always in memory, and that this place is permanent: if you rename an ident the old one still works, there's no retracting from this special cache. Which doesn't seem like a good place to store domain knowledge.
Is this a case in which these advice were given at a different time and one is superseded? What are you folks doing in this case?
An example of my use case would be to store the phase of an object,
:object/phase could be
:phase/exit. Should i use a ref and db/idents or a keyword?
I have always understood this advice:
> Idents should not be used as unique names or ids on ordinary domain entities.
as referring to non-enumerated unique identifiers. I.e., user IDs or similar, where the set of potential IDs is open.
I would personally use idents for the
:object/phase use case you describe.
If you don't mind having application code verifying valid keywords(which you should anyway) I would go with keywords, for small pools of enumeration the performance impact won't be noticeable
A rule of thumb: if it’s something the developer creates as part of their own maintenance of the data model, you can use an ident; but idents ought not to be created by users
by "you can use and ident" you imply a keyword is fine too? how helpful are the constraints of enumerated idents in the real world?
Benefits of ident-entities: you can change their name (old idents continue to work even after retracted), you can add metadata (e.g. membership in an enum, a :db/doc), you get a VAET index.