datomic

Ask questions on the official Q&A site at https://ask.datomic.com!
mikejcusack 2021-03-02T00:41:36.056400Z

The latter option isn't using history.

em 2021-03-02T02:37:29.056600Z

In the context of a more event-sourced model the former can make a lot of sense with multiple streams, out-of-sync arrivals, various sources of truth etc. but in this case I think the tx-function approach is totally fine. Especially considering that the scale seems small, and Datomic having single global write transactor. Then again if the scale is small enough reducing on every lookup might not be that expensive either.

mikejcusack 2021-03-02T02:46:28.056800Z

That's about what I was thinking. I don't think the scale would be large enough for reducing to be a problem. Especially since the query would filter down to the relevant transactions first.

steveb8n 2021-03-02T03:46:42.058200Z

Q: the on-prem api supported running datalog queries against regular vectors/maps (instead of the db). 1/ where are those samples? 2/ is this also possible using the client/cloud API?

2021-03-02T18:49:21.062900Z

In peer you can supply a vector of vectors. You can’t in client

steveb8n 2021-03-03T22:35:01.078900Z

thanks. I thought that was the case. shame but core.match will work too

steveb8n 2021-03-02T03:47:18.058300Z

background: I need a matching api and I’d like to try using datalog instead of core.match

henrik 2021-03-02T07:47:27.059400Z

Is there a way to parameterize the pull expression when used in a query? I.e, something like

{:find [(pull ?item ?pull-fields)] … }
(This example does not work)

tatut 2021-03-02T09:20:52.060100Z

you can have patterns as :in parameters without the ?

henrik 2021-03-02T10:23:27.060300Z

So I can, thank you. So the ? is magic, I just thought it was a part of the symbol name.