#+BEGIN_QUERY
{:title "All todos with tag project"
:query [:find (pull ?b [*])
:where
[?p :block/name "project"]
[?b :block/ref-pages ?p]]}
#+END_QUERY
However, I cannot even find the keyword “block/ref-pages” in the db_schema.cljs
I assume the block record in db should has a record with “block/ref-pages” in it, then the schema file should contains something like “block/ref-pages” at least, so did I miss something?
Hey, any comments? I am surprising it seems no one really care about this question, then how people create the magic query without a “schema” to refer?
Thanks very much, @danzu
So, how can I understand about how those schema really implemented internally?
Maybe I can ask a detail example, such as, assume I have a page named “Foo”, so how can I know what exactly “property” from that schema file which related to this “Foo” page.
For example, assume “block/ref-pages” may used as a data binding to this “Foo” block, so how can I know this fact only from that db_schema file except “guess”.
Is there some kind of “magic query” which people can used to understand a full entity + properties. I am trying to build some query, but I have no idea how to get a full property view of internal logseq entity.
Thx I came here because I have the same question. Maybe, you could update the query examples on your documentation page wherein still says „ref-pages“, see here:
@winterTTr I agree that queries and how they can be used are a really underdocumented feature of Logseq which makes it hard to unlock their power.
Have you tried the developer mode (Settings > Advanced > Developer Mode)? It allows you to view page properties (Three dots in the corner > Show page data) and block properties (right click on bullet > show block data).
In learn datalog today one of the samples you work through is writing a query that returns the identifiers for the database schema. I expect that this is still feasible, but I couldn’t get it to work from copying what worked when I did the tutorial.
Despite not having the context that code comments will have - unless there’s going to be a metadata with text describing the schema element - I still think it provides value and will never cause a version issue for the user.