This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-06-13
Channels
- # beginners (36)
- # boot (1)
- # cider (4)
- # cljsrn (2)
- # clojure (137)
- # clojure-brasil (3)
- # clojure-czech (3)
- # clojure-italy (17)
- # clojure-nl (8)
- # clojure-spec (7)
- # clojure-uk (153)
- # clojurescript (84)
- # data-science (2)
- # datascript (13)
- # datomic (30)
- # editors (64)
- # emacs (22)
- # events (6)
- # figwheel (26)
- # fulcro (7)
- # hoplon (5)
- # jobs (5)
- # jobs-discuss (57)
- # keechma (3)
- # leiningen (4)
- # luminus (1)
- # midje (2)
- # off-topic (26)
- # portkey (18)
- # re-frame (4)
- # reagent (10)
- # ring-swagger (3)
- # shadow-cljs (135)
- # spacemacs (5)
- # sql (14)
- # tools-deps (125)
How do I handle a customer that might stop having an address? Like [:db/retract 123 :customer/address "oldaddress"]
Is there some util-functions that will take an entity and produce the needed retractions?
{:db/id 123 :customer/attribute :something}
should in this case retract :customer/address
Doing an SPA and having a hard time figuring out how to communicate changes back to the server
How do people do local development when using datomic cloud in production? If I understand the documentation correctly, there is a different client api dependency for on-prem and cloud, and the client api doesn't have an in-memory mode. Just wondering how I'm supposed to do unit testing or local development if on a plane or the network goes down.
@rhansen not the case!
well, partially anyway
{:server-type :ion
:region "us-east-1"
:system "stu-8"
:query-group "stu-8"
:endpoint " "
:proxy-port 8182}
that will resolve to the local implementation when deployed into an ion, but will go through the socks proxy for local dev
so you do need a network connection, but there is a local dev story
@alqvist https://docs.datomic.com/cloud/transactions/transaction-functions.html#sec-1-1
that all said, we understand the value of local dev and plan to continue improving in that area
@alqvist That function will retract the entire entity. If you just want to retract a single attribute of the entity, you can do it exactly as you showed, issuing an explicit [:db/retract entityID :attrID Value] in a transaction
@stuarthalloway Interesting. My goal is an ion setup, so this does seem to help 🙂
@marshall On the client I have a pull(nested map) for some entity. A few assocs and dissocs is applied to that map - How can use the original map and the new to get a list of transactions that will lead to the same state?
I don’t think there is a thing for that but you could probably use something like http://clojure.github.io/clojure/clojure.data-api.html#clojure.data/diff to make data that you transform into a txn
might be a nifty small library. maybe someone has already done this?
ok thanks
@alexmiller @andreas862 I've had my eye on this library for use cases such as this: https://github.com/juji-io/editscript
Thanks for the link, will check it out
the readme in datomic-free.zip says one can get the peer from maven but no version of it shows in maven https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.datomic%22%20AND%20a%3A%22datomic-free%22
the Datomic Free peer is in clojars The Datomic Pro peer is available by private maven repo, credentials supplied in your http://my.datomic.com account @lockdown-
@marshall ok, looks like it wasn't resolving for me because the latest version is not available in clojars yet: https://clojars.org/com.datomic/datomic-free
@lockdown- Ah - i’ll have a look. Thanks for catching that
@lockdown- if you need it in the interim, you can download it directly from https://my.datomic.com/downloads/free and use the bin/maven-install
script to install it locally
@rhansen I created https://github.com/stevebuik/ns-clone to deal with this. works well for me. Sounds like it won’t be necessary in future though.