Fork me on GitHub
#datomic
<
2018-09-12
>
pfeodrippe04:09:34

Hi, I'm using datomic on-prem with dynamoDB as backend and I have a function c/uuid which creates a random uuid (which namespace is not at transactor classpath!). I must pass some uuids to a transactor function tx-f, could I use a lazy-seq created with repeatedly as arg (e.g uuids) to tx-f and, as a example, use (take 4 uuids) inside tx-f?

ninja14:09:37

Hi, question about retracting an entity: Using a pull query in the form of (d/pull db '[*] eid) after having the entity retracted using the same eid yields the :db/id. Since I was expecting it to return nil, why does it not?

henrik14:09:47

@atwrdik Are you using the DB from before it was deleted?

henrik14:09:02

You need to reacquire the DB from the connection to get the current one.

favila14:09:26

@atwrdik this is an implementation detail

favila14:09:17

if an entity ever had assertions, you will get {:db/id x}; otherwise you will get nil

favila14:09:38

entity ids don't exist or not exist; the only meaningful question is whether anything is asserted of them

ninja15:09:33

@henrik I'm already using the DB after it was retracted.

ninja15:09:26

@favila So retracting only "removes" all attributes and their corresponding values from the entity (as well as references)? So an entity not having an attribute can be treated as if it is not existent?

favila15:09:56

the only thing that exists is assertions [e a v tx op]

ninja09:09:57

Thank you for the clarification. The links helped a lot. The last paragraph in the documentation here (https://docs.datomic.com/on-prem/entities.html#basics) also was quite helpful.