Fork me on GitHub

@dustingetz I’ve rolled my own. You could do this in a txn fn or (in my case) in the client that sends the tx data. it’s pretty straightforward to do. you do need a cross-cutting fn to lift idents, re-shape ordered cardinality-N attrs etc.


you are right that this would be a nice lib if it existed. I hope that we will see something like this as an add-on from Datomic/Cognitect (maybe when spec2 is nailed down) but, until then, it’s roll your own


if you use the ideas in this post, it becomes much easier

Dustin Getz02:10:59

how about the query side - datomic pull and s2/select


same thing. you need a cross-cutting fn to translate. In my case I composed the pull expr for each entity into the query variety of each entity so that the translate fn can be used for pull or query.


thinking about this: you could use the spec describe to drive the translate fns. slightly more complex but then fully generic i.e. much less boilerplate