simple question, what datomic.client.api/delete-database
does in Datomic Cloud ?
• is the operation revertable?
• do we still keep past transactions in s3?
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"})}]})
I don’t believe it is reversible. https://ask.datomic.com/index.php/550/does-deleting-database-permanently-remove-stored-database
oh I missed that thx 🙏 I guess we have the same behavior for datomic cloud
Hey @donavan
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 😄
Good spot re. the reverse reference…
Again, mixing up data that was from repl output with hand written modifications
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.
i reported that cas bug in a portal that i think that do not exists anymore 😅
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! 😉
FWIW, this isn't a green light expecting everything to work perfectly out of the box. I think you should try it and report back.
Got it! I'll just try and see how it goes then