Ask for suggestions on the coming query DSL

Hey everyone, we’re working on the query DSL, the initial syntax could be something like this:

{{query (and [[page A]] [[page B]]
             (todo NOW DOING)
             (property key value)
             (priority A B)
             (between -7d +7d))}}

What do you think?

4 Likes

Can I ask some markers or keywords like “scheduled, deadline, collapse”, how are they implemented in such DSL?

Some questions about it. Not sure all are syntax issues, but I’m not super familiar with queries.

Does and apply to just the first line or all lines? If all lines, why not have and on a separate line from [[page A]] [[page B]]?
What is the syntax for Boolean searches and search groupings? e.g. ((A and B) or C) and (D)
Is there not syntax and how is it parsed? e.g. can I not(priority A) and also (priority not(A)), where the first would include items with no priority, and the second would include only items with a priority that is not A?
Is the search case-sensitive and if no can the user mark certain searches as case sensitive?
Do regular expressions work for text search?
Can the query be limited to the current page without “hardcoding” the page name? (Having variables like “currentpage” would be very useful for query templates that could then be pasted into multiple pages).

3 Likes