Matt's Roof Garden

Powered by 🌱Roam Garden

November 27th, 2021

Find empty thoughts

{
     let queryText = `[:find ?title:name 
                        :in $ ?namespace
                        :where [?page :node/title ?title:name]
                                [?page :block/uid ?title:uid]
                                [?page :edit/time ?time:date]
                                [(clojure.string/starts-with? ?title:name ?namespace)]]`;
window.roamAlphaAPI.q(queryText,'Podcast/');

}
{
  
     let queryText = `[:find (pull ?block [:block/text {:block/_children ...}]) 
                       :in $ ?page
                       :where
                        [?block :block/refs ?ref]
                        [?ref :node/title ?page] ]`;
    window.roamAlphaAPI.q(queryText, 'thoughts');

}

{
  
     let queryText = `[:find ?text
                       :in $ ?pg
                       :where
                        [?page :node/title ?pg]
                        [?refs :block/refs ?page]
                        [?text :block/text ?refs]

                         ]`;
    window.roamAlphaAPI.q(queryText, 'thoughts');

}