This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-03
Channels
- # aleph (1)
- # announcements (9)
- # babashka (3)
- # beginners (200)
- # calva (22)
- # cider (74)
- # clojure (97)
- # clojure-dev (43)
- # clojure-europe (15)
- # clojure-italy (4)
- # clojure-nl (4)
- # clojure-sanfrancisco (2)
- # clojure-uk (103)
- # clojuredesign-podcast (2)
- # clojurescript (45)
- # core-async (5)
- # cursive (13)
- # datomic (42)
- # emacs (20)
- # fulcro (6)
- # graalvm (37)
- # jackdaw (10)
- # leiningen (7)
- # mid-cities-meetup (3)
- # off-topic (2)
- # pathom (1)
- # pedestal (3)
- # re-frame (6)
- # reagent (38)
- # reitit (5)
- # shadow-cljs (117)
- # spacemacs (1)
- # sql (1)
- # tools-deps (17)
- # vim (14)
- # xtdb (18)
Hi! is there a way in a transaction to reference txInstant in the same way we can reference tx with "datomic.tx"
?
@vlaaad last time that i searched about it i endup with [:db/add "datomic.tx" :dummy-attribute ""]
😞
In the response :tx-data
, look for an assertion of :db/txInstant where the e and the tx of the datom are the same
the tx instant is not available to transaction functions. I’m not sure when the implied tx instant datom assertion is added
something like [:db/add "my-entity" :my-entity/created-at "datomic.txInstant"]
. I just want to have a precise instant because later I might use in as-of queries
because this “my-entity” is a public release version, sort of like a git tag that is then used by consumers to see data at that time
I don't think you can or should do this? the datom already is in a transaction that will have the txInstant when it's transacted
^^^, although ergonomically it’s not accessible as data, only metadata (i.e. can’t get at it with d/pull)
yes, and this is a possibility I’m thinking about as well, but using tx id instead of date as a version will make me expose implementation details
your application would not expose tx id, it would follow the ref and expose the txInstant
that may be warranted, but keep in mind as-of and other history features are not designed to manage domain time
so even the use case of “I have a created-at instant on an entity, I now want to use that to see what the db looked like at that moment” is suspect because it is blending those times
this may be fine if you want this domain time to have the same guarantees as your time-of-record, but in that case you should reference the TX directly (or even better use the TX on the datom directly)
glad to help. This is a subtilty of datomic’s history features it took me a while to internalize
interestingly Crux adds domain time as a first class concept on top of what I’m calling “record” time: https://opencrux.com/
It makes other different tradeoffs vs datomic, but if time-traveling your domain is really import it’s an option to consider
Hi there, I think I may have ran into a bug on datomic-free
(using version 0.9.5697)? I've made a small example of it https://github.com/danmason/datomic-close-query but essentially I was using datomic.api/query
with a :timeout
(in the example I set the timeout to 1ms, and it behaves in the same way) and it appeared to prevent my application from closing properly? Removing the :timeout
from the query-map allowed it to exit fine.
did it close if you wait 1 minute?
if so, maybe (shutdown-agents)
?
I was originally running it on something a bit longer and did include (shutdown-agents)
(forgot to add that to my little example, but might be worth a try!) but it did continue running longer than a minute. I'll give that a go on this too, however, and get back to you.
was just a shot in the dark :)
Mhm 🙂 Including (shutdown-agents)
, it does continue to run regardless.
Hi, when the entity got entered twice what is an idiomatic way to merge these two entities. I have entities A and B and want to change all refs that point to B to point to A and then delete (retract-entity) B. I am not a native speaker and fail to find the right keywords to goolge for this. Does anyone know a manual entry or blog post that describes that?
when I'm executing clj -A:ion-dev "{:op :push}"
, I'm seeing the following error
{:command-failed "{:op :push :region us-east-1}",
:causes
({:message "Unable to transform path",
:class ExceptionInfo,
:data
{:home "/github/home",
:prefix "/github/home/.gitlibs/libs",
:resolved-coord
{:git/url "[email protected]:my-org/my-repo",
:sha "467d04ca6da5b43771b66eecf33aa23e768026a4",
:deps/manifest :deps,
:deps/root
"/root/.gitlibs/libs/github-my-org/my-repo/467d04ca6da5b43771b66eecf33aa23e768026a4",
:paths
["/root/.gitlibs/libs/github-my-org/my-repo/467d04ca6da5b43771b66eecf33aa23e768026a4/src"]}}})}
What does this error mean?