Hi, I have some tasks on pages that I want to query.
type:: #Project
status:: Active
I have this query:
#+BEGIN_QUERY
{
:title [:b "Active Tasks in Active Projects"]
:query [:find (pull ?b [*])
:where
[?b :block/page ?p]
[?p :block/properties ?prop]
[(get ?prop :type) ?type]
[(= "Project" ?type)]
[(get ?prop :status) ?status]
[(= "Active" ?status)]
[?b :block/marker ?marker]
[(contains? #{"DOING" "NOW"} ?marker)]
]
:breadcrumb-show? false
}
#+END_QUERY
It shows no results.
It does show some results when I change
[(= "Project" ?type)]
to [(= #{"Project"} ?type)]
but honestly, I have no idea why.
I came up with this query:
#+BEGIN_QUERY
{
:title [:b "Active Tasks in Active Projects"]
:query [:find (pull ?b [*])
:where
[?b :block/page ?p]
(page-property ?p :typ "Project")
(page-property ?p :status "Active")
[?b :block/marker ?marker]
[(contains? #{"DOING" "NOW"} ?marker)]
]
}
#+END_QUERY
And it works as expected, but it’s really slow. And the graph is brand new so there’s not that much data to go through.
Can anyone help me with this? What am I doing wrong?
Also, What if a pages has multiple types: type:: #Project #eBook
?
Thank you!