Hi Alex,
This returns blocks with link [[sbp1]] and their children on pages with page-property SomePageProperty:: spp1.
The block link can be either a property with a linked value or just a link/tag.
Thanks for the clarification about “:property-pages/enabled? false”. I was confusing property names with values. Now I will have to consider the consequences of not automatically having a page for each property name.
{{query ... (page-property ... ) ...
will return pages with specified page property
{{query ... (property ... ) ...
will return blocks with specified property
{{query [[link]]}}
return blocks with [[link]] and children of those blocks. (and of course the page with name Link and all blocks in that page). This is the only valid inheritance rule.
These queries {{query (operator (page-property ...) (property ...) }} {{query (operator (page-property ...) [[link]]}}
should return error, it’s basically type error, trying to group pages and blocks together
Thank you for pointing this out, as the lesson is indeed incorrect. Sorry for the confusion, but I also had a wrong understanding of how block properties work.
block properties are not applied to their entire branch
It is also like this in org-mode and, there too, for performance reasons. Tags (links in Logseq) are inherited while properties aren’t.
@Ramses it confuses me that you say that sort-by is just for pages because only pages have creation and modification dates. But AFAICU sort-by may be used in order to sort by other properties, so why would it just work on pages?
I’ve learned that later as well, but I wasn’t aware of that at the time of writing these lessons.
However, the way sort-by is used in the course is by sorting on dates. The thing is, only pages have the date properties (blocks don’t at the moment, due to performance issues). That’s why I said they only work in combination with pages. When I run another cohort of this course, I’ll probably show how to use sort-by in combination with other properties.
I found a bug here. If I do sort-by with a property whose value is a journal page, it will not sort by the journal date. With advanced queries it does work, but I wish I didn’t have to resort to that.
Hey @Federico_Frosini, that’s outside the scope of this course as it’s about simple queries only.
If you have a question about advanced queries, I recommend you search the forum or otherwise create a new thread/post in Questions & Help and give it a clear, descriptive title. That way, your question is much more likely to be seen and receive answers.
Hi all, first of all thanks for the documentation! I just wanna mention that the first link in this article - “As per the official documentation” is currently invalid. I assume that the page you intended to link to was Properties (logseq.com).
This is very confusing. I have spent 10 minutes completely confused with my logseq database, trying to see some results while typing these. The problem is, I failed to catch any query with page-property in it. Is it still in logseq, or has it been deprecated since??
Still works.
If you use the live query builder and first select pages at the top right, then page property you should get a list of page properties you have in use.
If that list is empty, then you have not yet (properly) defined any and so queries will not return results.