diff --git a/CHANGELOG.md b/CHANGELOG.md index 91f767a..1f845af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.22.3 (2025-02-04) +- Ability to enable / disable query refreshing individually for each query (REFRESH / NO REFRESH statement) +- (Advanced) Added ability to show SQL execution plan for the query + # 0.22.2 (2025-02-01) - Added index to tags.tag which was missed in the last release diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index a244bf3..3004782 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -29,6 +29,7 @@ export default defineConfig({ { text: 'Inline codeblocks', link: '/inline-codeblocks' }, { text: 'Links and Images', link: '/links-and-images' }, { text: 'CSV Viewer', link: '/csv-viewer' }, + { text: 'Query Configuration', link: '/query-configuration' }, { text: 'Troubleshooting', link: '/troubleshooting' }, { text: 'Future Plans', link: '/future-plans' }, { text: 'Changelog', link: '/changelog' } diff --git a/docs/explain.png b/docs/explain.png new file mode 100644 index 0000000..91a3a49 Binary files /dev/null and b/docs/explain.png differ diff --git a/docs/query-configuration.md b/docs/query-configuration.md new file mode 100644 index 0000000..dc44dfc --- /dev/null +++ b/docs/query-configuration.md @@ -0,0 +1,28 @@ +# Query Configuration +You can specify the following configuration to change behaviour of your query. + +Configuration statements go always after all `TABLE` statements and before view / renderer definition or SELECT definition. + +Example: +```sqlseal +TABLE data = file(data.csv) + +REFRESH +EXPLAIN + +GRID +SELECT * FROM data +``` + +## Refresh +You can use `REFRESH / NO REFRESH` to change default refreshing behaviour. +When you set `NO REFRESH`, the query will execute once and will not listen to any changes to the underlying data. This is especially helpful if you run very expensive query and want to have full control on when it refreshes. + +`REFRESH` will refresh the query every time the underlying data changes. It listens only to the tables you actually use in the query. + + +## Explain +You can use `EXPLAIN` statment to show execution plan of the query. This is helpful when you want to analyse the queries performed to optimise them or see where are bottlenecks. +For majority of the queries explain might be very simple but your more advanced it can bring some insights: + +![Explain example](./explain.png) \ No newline at end of file diff --git a/manifest.json b/manifest.json index 6eb32c3..c91e091 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "sqlseal", "name": "SQLSeal", - "version": "0.22.2", + "version": "0.22.3", "minAppVersion": "0.15.0", "description": "Use SQL in your notes to query your vault files and CSV content.", "author": "hypersphere", diff --git a/package.json b/package.json index 456e17d..7ae207d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sqlseal", - "version": "0.22.2", + "version": "0.22.3", "description": "A plugin for Obsidian that allows you to run SQL queries on your notes.", "main": "main.js", "scripts": { diff --git a/versions.json b/versions.json index ca97899..410eeca 100644 --- a/versions.json +++ b/versions.json @@ -38,5 +38,6 @@ "0.21.3": "0.15.0", "0.22.0": "0.15.0", "0.22.1": "0.15.0", - "0.22.2": "0.15.0" + "0.22.2": "0.15.0", + "0.22.3": "0.15.0" } \ No newline at end of file