-
-
Notifications
You must be signed in to change notification settings - Fork 427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Another idea... Templated queries #76
Comments
Yeah, seems useful for common queries like "show all the daily notes for month " or "create a generic index over files tagged #thing". Will see what I can do. |
Yep! This would be especially powerful in combination with your existing idea to have a Thanks, you are awesome! ❤️ |
Hey there, what was the use case for this? |
Hi @AB1908 I'm not OP, but I'll provide a few use cases based on my usage. There are a few queries I include in all notes of a certain type. For instance, contact notes contain queries to get all the projects a person is a part of and which meetings they've attended. If I could reference a named query in my contacts note template, all current and future contact notes would contain the latest query when I make changes (DRY). Writing regex find/replace to update all query instances is painful at the moment and needlessly updates the file modification time of the notes. Not something I'm using yet, but the inline syntax seems really powerful. Its compact nature I think would lend itself well to some sort of "stored procedure" as well. |
This seems doable via |
Concept syntax:
Config screen then has a section to select a template folder.
template
is the name of the note in the template folder. That note can contain anything (for descriptive comments, etc) but only the actual query itself is extracted from the template at runtime and executed in the target note. Using named params instead of positional params keeps the calling syntax extensible.There are certainly other ways to do it as well, this is just a thought.
The text was updated successfully, but these errors were encountered: