datomic

Ask questions on the official Q&A site at https://ask.datomic.com!
zilti 2020-08-14T08:56:04.186900Z

Has someone here used Datomic with Algolia before, or with something similar? If so, are there any gotchas or something I should be aware of?

category 2020-08-14T09:47:05.189Z

Re: https://docs.datomic.com/cloud/getting-started/configure-access.html#authorize-user https://docs.datomic.com/cloud/ions/ions-tutorial.html#org6699cd4 Please can you confirm whether or not administrator permissions are required for all applications to connect to datomic cloud?

kenny 2020-08-14T16:48:27.191Z

When initially transacting your schema on a fresh database and using tuple attributes, do folks typically do 2 transactions -- one for the schema without tupleAttrs and one with the tupleAttrs?

kenny 2020-08-14T16:51:50.191800Z

Wait, order in the transaction appears to matter! This transaction fails

(d/transact conn {:tx-data [#:db{:ident       ::a+b,
                                   :valueType   :db.type/tuple,
                                   :tupleAttrs  [::a ::b],
                                   :cardinality :db.cardinality/one,
                                   :unique      :db.unique/identity}
                              #:db{:ident       ::a,
                                   :valueType   :db.type/string,
                                   :cardinality :db.cardinality/one}
                              #:db{:ident       ::b,
                                   :valueType   :db.type/string,
                                   :cardinality :db.cardinality/one}]})
Execution error (ExceptionInfo) at datomic.core.error/raise (error.clj:55).
:db.error/invalid-install-attribute First error: :db.error/invalid-tuple-attrs
And this one succeeds.
(d/transact conn {:tx-data [#:db{:ident       ::a,
                                   :valueType   :db.type/string,
                                   :cardinality :db.cardinality/one}
                              #:db{:ident       ::b,
                                   :valueType   :db.type/string,
                                   :cardinality :db.cardinality/one}
                              #:db{:ident       ::a+b,
                                   :valueType   :db.type/tuple,
                                   :tupleAttrs  [::a ::b],
                                   :cardinality :db.cardinality/one,
                                   :unique      :db.unique/identity}]})