From 87ed549eae57b7d3d6b31ddf2ab3a48bd83279f2 Mon Sep 17 00:00:00 2001 From: "Sinan Sonmez (Chaush)" Date: Fri, 29 Jul 2022 16:05:43 +0000 Subject: [PATCH] write What, syntax and how to run --- website/🔌 Query.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/website/🔌 Query.md b/website/🔌 Query.md index 11772cf6..3c187840 100644 --- a/website/🔌 Query.md +++ b/website/🔌 Query.md @@ -5,4 +5,24 @@ repo: https://github.com/silverbulletmd/silverbullet author: Silver Bullet Authors ``` -The query plug is a built-in plug implementing the `` mechanism. \ No newline at end of file +### What? +The query plug is a built-in plug implementing the `` mechanism. You can use query plug to automatically receive information from your notes. + +### Syntax +1. start with: `` +2. end with: `` +3. write your query: replace `[QUERY GOES HERE]` with any query you want using options below +4. available query options: Usage of options is similar to general query language except special render option. Render option is to use display the data in a format that you created in a separate template + * `where` + * `order` + * `limit` + * `select` + * `render` +5. If you are a developer or have a technical knowledge to read a code and would like to know more about syntax please check out [query grammar](https://github.com/silverbulletmd/silverbullet/blob/main/packages/plugs/query/query.grammar) + +### How to run a query +After writing the query, there are two options +* Open the **command palette** and run **Materialized Queries: Update** +* Use shortcut: for windows **Alt-q** and for mac **Option-q** + +After using one of the options, the data will be displayed. \ No newline at end of file