Skip to content

Instantly share code, notes, and snippets.

The aim is to be able to use om.next/set-query! with datascript. I store the query for each component as a new index ':tree-path->query'.
tree-path->query: {
"de$mpg$shh$lims$ui$components$dynamic_query_test$RootView_[]" {
:query [{:app/root [:db/id {:app.root/trunk "de$mpg$shh$lims$ui$components$dynamic_query_test$TrunkView_[]"} {:app.root/another "de$mpg$shh$lims$ui$components$dynamic_query_test$AnotherView_[]"}]}]},
"de$mpg$shh$lims$ui$components$dynamic_query_test$TrunkView_[]" {
:query [:db/id :app.root.trunk/text-one {:app.root.trunk/branches ["de$mpg$shh$lims$ui$components$dynamic_query_test$BranchView_[:app/root :app.root/trunk :app.root.trunk/branches 0]" "de$mpg$shh$lims$ui$components$dynamic_query_test$BranchView_[:app/root :app.root/trunk :app.root.trunk/branches 1]"]}]},