Files
LogSeq/logseq/bak/pages/logseq/2024-02-11T02_32_14.782Z.android.md
2025-12-11 06:26:12 -08:00

1.9 KiB

  • Wallabag
  • Queries
    • https://docs.datomic.com/cloud/query/query-data-reference.html
    • Cool query with good comments - "query todo without subtodos?"
      • https://discuss.logseq.com/t/how-to-query-todo-without-subtodos/24938/3
        • #+BEGIN_QUERY
          {
           :query [:find (pull ?block [* ])
           :in $ ?current-page
           :where
             [?page :block/name ?current-page]      ; in current page
             [?block :block/page ?page]             ; any blocks
             [?block :block/marker ?marker]         ; that have marker
             [(contains? #{"TODO"} ?marker)]        ; TODO
             (not                                   ; but don't have
               [?child :block/parent ?block]        ; any child
               [?child :block/marker ?childmarker]  ; with own marker
               [(contains? #{"TODO"} ?childmarker)] ; TODO
             )
           ]
           :inputs [:current-page]
          }
          #+END_QUERY
          
    • Why does B work and not A
    • #+BEGIN_QUERY {:title "next week deadline or schedule - excluding work" :query [:find (pull ?block [* ]) :in $ ?start ?next :where [?block :block/scheduled ?d] [?block :block/deadline ?d]) (not [(contains? #{"TODO"} ?marker)]) [(> ?d ?start)] [(< ?d ?next)] )] :inputs [:today :7d-after] :collapsed? false} #+END_QUERY
    • #+BEGIN_QUERY
      {:title "next week deadline or schedule" :query [:find (pull ?block [*]) :in $ ?start ?next :where (or [?block :block/scheduled ?d] [?block :block/deadline ?d]) [(> ?d ?start)] [(< ?d ?next)]] :inputs [:today :7d-after] :collapsed? false}