This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-02-25
Channels
- # announcements (6)
- # asami (1)
- # babashka (80)
- # beginners (89)
- # bitcoin (1)
- # calva (30)
- # cider (33)
- # clj-kondo (1)
- # cljsrn (45)
- # clojars (5)
- # clojure (60)
- # clojure-australia (1)
- # clojure-dev (9)
- # clojure-europe (133)
- # clojure-italy (7)
- # clojure-nl (6)
- # clojure-uk (44)
- # clojurescript (11)
- # conjure (1)
- # data-oriented-programming (2)
- # datahike (13)
- # datascript (4)
- # datomic (19)
- # deps-new (29)
- # depstar (5)
- # duct (39)
- # fulcro (8)
- # girouette (1)
- # helix (10)
- # honeysql (17)
- # jobs (5)
- # jobs-discuss (2)
- # leiningen (6)
- # lsp (51)
- # malli (60)
- # meander (37)
- # membrane (8)
- # off-topic (31)
- # overtone (3)
- # pathom (36)
- # re-frame (8)
- # reagent (30)
- # remote-jobs (2)
- # sci (1)
- # sql (32)
- # startup-in-a-month (3)
- # testing (3)
- # tools-deps (7)
- # xtdb (7)
simple question, what datomic.client.api/delete-database
does in Datomic Cloud ?
• is the operation revertable?
• do we still keep past transactions in s3?
I don’t believe it is reversible. https://ask.datomic.com/index.php/550/does-deleting-database-permanently-remove-stored-database
What’s the easiest way to insert ref entities; I’d imagine doing something like this but it doesn’t work:
(d/transact
conn
{:tx-data
'(#:sub-thing{:some-field "some-data"
:_thing/sub-things [:thing/id "some-application-level-id"]})})
I guess this is it
(d/transact
conn
{:tx-data
[{:thing/id "some-application-level-id"
:thing/sub-things '(#:sub-thing{:some-field "some-data"})}]})
Hey @U0VP19K6K
As far I know, you can always use []
'()
are just more complex to write
Here your examples expanded
;; first try
{:tx-data [#:sub-thing{:some-field "some-data"
:_thing/sub-things [:thing/id "some-application-level-id"]}]}
=> {:tx-data [{:sub-thing/some-field "some-data"
:_thing/sub-things [:thing/id "some-application-level-id"]}]}
;; Second try
{:tx-data [{:thing/id "some-application-level-id"
:thing/sub-things [#:sub-thing{:some-field "some-data"}]}]}
=> {:tx-data [{:thing/id "some-application-level-id"
:thing/sub-things [{:sub-thing/some-field "some-data"}]}]}
In the first case, I think that you miswrite the "reverse reference" I think that you tryied to write this:
{:tx-data [#:sub-thing{:some-field "some-data"
:_sub-things [:thing/id "some-application-level-id"]}]}
=> {:tx-data [{:sub-thing/some-field "some-data"
:sub-thing/_sub-things [:thing/id "some-application-level-id"]}]}
Thanks, yeah I just copied that from a much larger tree that I was generating programatically, I don’t normally write manual lists 😄
So are the reverse references valid in tx-data entities like that? (I will test later regardless)
I think that yes, but I already had some issues using lookup references
in some places. Sometimes it feels intuitive to use them, but in pratice you need to resolve and use "the db id"
For example I had issues with [:db/cas e a v0 v1]
when v0
is an entity, I tryied to use lookup ref and datomic do not accept its
IMHO it's a bug from datomic and not sure if in newer versions it's fixed.
lookup reference
- when you do [:an-unique-attr "it's value"]
Ah cool, thanks for the info! 🙂 I didn’t know if it was possible so just reverted to the second approach above without thinking too hard about it.
Does anyone know if the https://github.com/uncomplicate/neanderthal stack (specifically the intel-MKL dependency `[org.bytedeco/mkl-platform-redist "2020.3-1.5.4"]`) "just works" on a datomic ion project, or would I have to tinker with the EC2 Compute Instances/Templates?
intel-MKL uses AVX operations. Just make sure you're using an instance that supports that. Please don't "tinker" with the instance templates.
Alright thanks! I asked because i specifically don't want to mess with the templates, so no worries! 😉