Fork me on GitHub

I wrote a few specter functions for turning nested data structures into datascript transactions It will find all the nested maps inside a composite datastructure, assign each of them a temporary id, then it'll pull it apart into a list, and replace all references to the map with its id. Thought might be useful for somefolks here


@conaw: I've done something like this (but for datomic -> datascript) just recently.


Though, if your attributes are in the datascript schema, then this is actually done automatically for you in datascript.


So in your example, if you give :c, :that, :deeper a schema, then you can just transact the entire map and it'll all be different entities.


right, and would have to have a schema for those if I wanted to pull them via refs anyway


@rauh: you’re building something datsync’esque?


Nope, just manually synching, the queries are simple enough and transformations are also easy that I don't need more magic for now.