Fork me on GitHub
#datomic
<
2021-09-10
>
az19:09:22

Is the entity api only for on prem or an older api? I was using d/entity in datomic free and after switching to dev-local and client api, I am not able to find this same functionality. Lastly, is there some doc I can refer to on the differences between the free and the dev-local version? I’m seeing some tutorials online that seem to have a mismatch between these versions. Thanks

schmee19:09:31

yes, entity doesn’t exist in cloud, pull is the suggested alternative. you can find the differences here: • https://docs.datomic.com/on-prem/cloud/moving-to-cloud.htmlhttps://docs.datomic.com/on-prem/overview/clients-and-peers.html

az20:09:15

Thank you

az23:09:20

How can one go about debugging a datomic query? I’m hitting the wall with creating a recursive rule and I would love to be able to see why the query engine returns what it does. Is there any tooling out there for this?

Fredrik23:09:14

Are you able to share more info about the query?

Fredrik23:09:45

As a general starting point, one can bind variables to partial results within the query and return that

az00:09:22

I thought that would be easier to explain. All code is online: https://github.com/design-driven-research/grand-central/tree/add-datomic-dev-tools

Fredrik00:09:47

Thanks for the thorough explanation. The first thing that popped to mind was https://docs.datomic.com/on-prem/query/pull.html#limited-recursion-example

az00:09:26

Thanks for this, so is pull the only realistic way to go for something like this? Also, will recursive pull only work if using the same attr?

az00:09:10

Thank you @U024X3V2YN4 I’m going to study this

Fredrik01:09:21

I think you are right that recursive pull only works on the same attribute. In your case you need to alternate betwee nodes and edges, so I'd probably go with something rule-based

az02:09:37

Got it, thanks for finding that out

Fredrik03:09:30

No problem, shout out if you need any more help!