From 4be859c8105196beb1db6cd56745239dbf7b2f36 Mon Sep 17 00:00:00 2001 From: "Sinan Sonmez (Chaush)" Date: Sat, 30 Jul 2022 15:42:25 +0000 Subject: [PATCH] adress PR review --- website/πŸ”Œ Query.md | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/website/πŸ”Œ Query.md b/website/πŸ”Œ Query.md index 4392bfd4..f6af57e8 100644 --- a/website/πŸ”Œ Query.md +++ b/website/πŸ”Œ Query.md @@ -6,15 +6,15 @@ author: Silver Bullet Authors ``` ### 1. What? -The query plug is a built-in plug implementing the `` mechanism. You can use query plug to automatically receive information from your notes. +The query plug is a built-in plug implementing the `` mechanism. You can use query plug to automatically receive information from your pages. ### 2. 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 +4. _available query options_: Usage of options is similar to SQL except special `render` option. Render option is to use display the data in a format that you created in a separate template * `where` - * `order` + * `order by` * `limit` * `select` * `render` @@ -27,7 +27,7 @@ After writing the query, there are three options: * Use shortcut: hit **Alt-q** (Windows, Linux) or **Option-q** (Mac) * Go to another page and come back to the page where query is located -After using one of the options, the data will be displayed. +After using one of the options, the β€œbody” of the query is replaced with the new results of the query data will be displayed. ### 4. Data sources Available data sources can be categorized as: @@ -37,18 +37,16 @@ Available data sources can be categorized as: Best part about data sources: there is an auto completion. πŸŽ‰ -Start writing ` 20 and country = "Italy" --> |name|age|city |country|page |pos | |----|--|-----|-----|---------------|----| -|John|50|Milan|Italy|Test Data Query|0 | -|Jane|53|Rome |Italy|Test Data Query|46 | -|John|50|Milan|Italy|πŸ”Œ Query |2148| -|Jane|53|Rome |Italy|πŸ”Œ Query |2194| +|John|50|Milan|Italy|πŸ”Œ Query |2198| +|Jane|53|Rome |Italy|πŸ”Œ Query |2244| -#### 4.3 Plugs’ data sources +#### 4.2 Plugs’ data sources Certain plugs can also provide special data sources to query a certain data. Some examples are * [[πŸ”Œ Github]] provides `gh-pull` to query PRs for selected repo * [[πŸ”Œ Mattermost]] provides `mm-saved` to fetch (by default 15) saved posts in Mattermost @@ -96,10 +91,10 @@ For the sake of simplicity, we will use `page` data source and limit the results |name |lastModified |perm|tags |type|uri |repo |author | |--|--|--|--|--|--|--|--| -|index |1659178324609|rw|undefined|undefined|undefined |undefined |undefined | +|index |1659178324000|rw|undefined|undefined|undefined |undefined |undefined | |Mattermost Plugin|1659108035000|rw|undefined|undefined|undefined |undefined |undefined | |PLUGS |1659108634000|rw|undefined|undefined|undefined |undefined |undefined | -|Test Data Query |1659179547936|rw|undefined|undefined|undefined |undefined |undefined | +|Test Data Query |1659179547000|rw|undefined|undefined|undefined |undefined |undefined | |template/plug |1659108035000|rw|undefined|undefined|undefined |undefined |undefined | |template/tasks |1659108035000|rw|#each|undefined|undefined |undefined |undefined | |πŸ’‘ Inspiration |1659108035000|rw|undefined|undefined|undefined |undefined |undefined | @@ -116,7 +111,7 @@ For the sake of simplicity, we will use `page` data source and limit the results |name |lastModified |perm|type|uri |repo |author | |--|--|--|--|--|--|--| -|πŸ”Œ Query |1659181148142|rw|plug|core:query |https://github.com/silverbulletmd/silverbullet |Silver Bullet Authors| +|πŸ”Œ Query |1659194185345|rw|plug|core:query |https://github.com/silverbulletmd/silverbullet |Silver Bullet Authors| |πŸ”Œ Mattermost|1659111156000|rw|plug|github:silverbulletmd/silverbullet-mattermost/mattermost.plug.json|https://github.com/silverbulletmd/silverbullet-mattermost|Zef Hemel | |πŸ”Œ Backlinks |1659108035000|rw|plug|ghr:Willyfrog/silverbullet-backlinks |https://github.com/Willyfrog/silverbullet-backlinks |Guillermo VayΓ‘ | |πŸ”Œ Ghost |1659108035000|rw|plug|github:silverbulletmd/silverbullet-ghost/ghost.plug.json |https://github.com/silverbulletmd/silverbullet-ghost |Zef Hemel |