This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-15
Channels
- # announcements (13)
- # aws (6)
- # babashka (23)
- # babashka-sci-dev (6)
- # beginners (64)
- # calva (110)
- # cider (25)
- # cljs-dev (5)
- # cljsrn (8)
- # clojars (5)
- # clojure (20)
- # clojure-austin (1)
- # clojure-europe (77)
- # clojure-nl (1)
- # clojure-uk (3)
- # clojurescript (14)
- # cursive (7)
- # datahike (9)
- # datomic (13)
- # eastwood (15)
- # emacs (14)
- # figwheel-main (1)
- # fulcro (8)
- # graalvm-mobile (2)
- # graphql (2)
- # honeysql (2)
- # hyperfiddle (2)
- # introduce-yourself (4)
- # jobs (4)
- # joyride (4)
- # leiningen (4)
- # lsp (8)
- # minecraft (8)
- # off-topic (11)
- # polylith (18)
- # rdf (2)
- # reagent (3)
- # reitit (4)
- # remote-jobs (1)
- # shadow-cljs (39)
- # specter (7)
- # xtdb (3)
has there been any progress in the area of a packaged solution for Datomic Cloud database restore-from-backup, either community supported or an official solution from Cognitect? we were investigating https://github.com/fulcrologic/datomic-cloud-backup but the project is no longer active, and last we checked it did not support tuples.
according to https://docs.datomic.com/cloud/transactions/transaction-functions.html#calling
transaction function calls within transactions should be represented as lists.
if i use vectors instead, the call still works, just like with tx fns, which are called via their indents, like :db/add
, db/retractEntity
...
can i rely on this undocumented behaviour in the future?
i would rather use vectors, because they are slightly more concise to construct programmatically,
but also because tooling wouldn't think, that it's a faulty function call, because it's missing its 1st db argument.
This feels like a very stylistic choice. On-prem documentation has only ever mentioned vectors and I’ve only ever used vectors. I’m surprised to see lists in docs.
so it just cares about whether the head of the seq is a keyword?
or qualified-symbol?
.
that sounds reassuring.
the problem with list is that we would need to jump thru some small hoops, if we want to generate txs, eg:
(let [some-tx-fn-arg 123]
(d/transact conn {:tx-data [(list `some-tx-fn some-tx-fn-arg)]))
or
`[(some-tx-fn ~some-tx-fn-arg)]
or
[`(some-tx-fn ~some-tx-fn-arg)]
but this wouldn't work:
[(`some-tx-fn ~some-tx-fn-arg)]
which i myself do understand, but not everyone on the team is so fluent in clojure.
they would however perfectly understand
[[`some-tx-fn some-tx-fn-arg]]