Fork me on GitHub
Ivan Fedorov19:03:44

Can I pull a denormalised structure from normalised data? If I put this in

(def village
  {:xt/id         "Lviv"
   :location/name "Lviv"
   :location/children ["Son1" "Son2"]})

(def village-son1
  {:xt/id         "Son1"
   :location/name "Son1"})

(def village-son2
  {:xt/id         "Son2"
   :location/name "Son2"})
Can I pull out?
{:xt/id         "Lviv"
 :location/name "Lviv"
  [{:xt/id         "Son1"
   :location/name "Son1"}
   {:xt/id         "Son2"
    :location/name "Son2"}]}


Yep, joins like that will work great! See the pull aggregate, or API, in the docs. XT's pull implements the EQL spec

Ivan Fedorov08:03:58

thank you!!

🙏 1