This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-04-04
Channels
- # aws (1)
- # beginners (163)
- # boot (1)
- # bristol-clojurians (1)
- # cider (7)
- # clara (1)
- # cljs-dev (22)
- # cljsjs (1)
- # clojure (43)
- # clojure-denver (1)
- # clojure-finland (6)
- # clojure-italy (1)
- # clojure-nl (3)
- # clojure-russia (1)
- # clojure-spec (1)
- # clojure-uk (6)
- # clojurescript (107)
- # cursive (4)
- # data-science (2)
- # datascript (2)
- # datomic (19)
- # duct (31)
- # emacs (1)
- # fulcro (50)
- # graphql (15)
- # hoplon (3)
- # lein-figwheel (2)
- # luminus (21)
- # off-topic (74)
- # onyx (3)
- # parinfer (15)
- # portkey (2)
- # precept (9)
- # proton (1)
- # re-frame (130)
- # reagent (73)
- # reitit (7)
- # ring-swagger (5)
- # shadow-cljs (61)
- # spacemacs (18)
- # specter (12)
- # uncomplicate (1)
- # vim (88)
- # yada (2)
GOT IT.
does anyone know how I can update an attribute inside an entity, datomic keeps creating a new entity, which I believe is expected based on what it proposes, however I need to change a string value inside an entity from "todo" to "doing". Is it not the datomic way to look at it?
@brnbraga95 (d/transact conn [[:db/add entity-id :your/attribute "doing"]])
or the slightly more paranoid (d/transact conn [[:db.fn/cas entity-id :your/attribute "todo" "doing"]])
entity-id
can be the actual entity id, e.g. (:db/id entity)
, or a unique reference. based on what you say (“keeps creating a new entity”) I suspect you are using a ref that is not unique?
Does anybody know how can I connect to remote transactor? My URL looks like
"datomic:"
But I could not google for where to put transactor’s host and port.The idea behind that is, before I had a single node with everything installed on it at once: Clojure app, Postgres and Transactor. Now I move them across several nodes. I’d like to have several Clojure app instances that connect to a node that has Postgres + Datomic transactor. Still, my app tries to communicate with local transactor by localhost + 4334.
Solved: the solution was to declare a global IP in transactor properties rather then localhost
. Other nodes discover it from the db.
@igrishaev that’s correct (https://docs.datomic.com/on-prem/deployment.html#getting-connected)
peers connect to storage first, read the transactor location, then connect to the transactor
is there of list of :db/error
values in the datomic docs?
I am aware of
- :db.error/transactor-unavailable
- :db.error/transaction-timeout
are there any others (that might be remediable)
is it reasonable to assume that #{:db.error/transaction-timeout :db.error/transactor-unavailable}
are the only two error types that are worth retrying ?
I have a syntax question. This is working:
(d/q '[:find (pull ?e [*])
:where [?e :team/id]] db)
This is not, and is throwing Exception
(d/q '[:find [(pull ?e [*]) ...]
:where [?e :team/id]] db)
Exception
ExceptionInfo Only find-rel elements are allowed in client find-spec
I’m using datomic-pro-0.9.5661Client only supports find rel https://docs.datomic.com/cloud/query/query-data-reference.html#find-specs
Peer has additional options for find spec https://docs.datomic.com/on-prem/query.html#find-specifications