This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-05
Channels
- # bangalore-clj (5)
- # beginners (77)
- # boot (29)
- # cider (11)
- # clojure (110)
- # clojure-dev (5)
- # clojure-greece (1)
- # clojure-poland (1)
- # clojure-russia (11)
- # clojure-spec (1)
- # clojurescript (143)
- # clojurex (1)
- # core-async (1)
- # css (1)
- # cursive (40)
- # data-science (1)
- # datomic (6)
- # figwheel (4)
- # fulcro (45)
- # immutant (5)
- # off-topic (4)
- # onyx (8)
- # portkey (9)
- # re-frame (112)
- # shadow-cljs (30)
- # spacemacs (3)
I have a possibly noob question about the Datomic libraries, I was following the Getting Started section in the Datomic Documentation and it only mentions the Client API to interact with the database, but one thing I noticed is that its examples regarding defining a schema are a bit different from the ones I found on the internet, its definitions are missing the :db/id #db/id[:db.part/db]
and :db.install/_attribute :db.part/db
parts in the maps. To tell you truth I seriously have no idea why it is necessary and I couldn't find documentation to help me learn about it, the only thing I found (http://docs.datomic.com/schema.html) is that it's related to defining a partition, but the documentation related to it uses it a bit differently:
[{:db/id "communities"
:db/ident :communities}
[:db/add :db.part/db :db.install/partition "communities"]]
I have been defining the schema for my attributes like this using the Client API:
{:db/ident :user/username
:db/valueType :db.type/string
:db/unique :db.unique/value
:db/cardinality :db.cardinality/one}
And it seems to be working, data is being stored in the database with an id. Does the Client API does that by default for me?
@marshall We've previously discussed keeping data for multiple customers in a single DB rather than splitting into many DB's on a single transactor. Will that advice still apply for Datomic Cloud?