Introduces two complementary solutions for the common mistake of filtering
by multiple tags with AND (which always returns zero results):
1. TAGS() macro: explicit opt-in syntax
WHERE TAGS('#project', '#active')
→ path IN (SELECT path FROM tags WHERE tag = '#project'
INTERSECT SELECT path FROM tags WHERE tag = '#active')
2. Auto-detection: transparently rewrites the broken pattern
WHERE tag = '#a' AND tag = '#b'
→ path IN (...INTERSECT...)
Mixed conditions (AND name = 'test') are preserved correctly.
Both use INTERSECT subqueries which are more flexible than an EXISTS
approach (no hardcoded table reference required).
Adds disableTagAutoDetection setting so advanced users can opt out of
the transparent rewrite and handle the SQL themselves.
Docs updated in query-vault-content.md and faq/understanding-tags.md.
|
||
|---|---|---|
| .changeset | ||
| .github | ||
| docs | ||
| scripts | ||
| src | ||
| types-package | ||
| .editorconfig | ||
| .eslintignore | ||
| .eslintrc | ||
| .gitignore | ||
| .npmrc | ||
| .prettierrc | ||
| CHANGELOG.md | ||
| CONTRIBUTING.md | ||
| esbuild.config.mjs | ||
| jest.config.js | ||
| LICENSE | ||
| manifest.json | ||
| package.json | ||
| pnpm-lock.yaml | ||
| README.md | ||
| tsconfig.json | ||
| version-bump.mjs | ||
| versions.json | ||
Obsidian SQLSeal
SQLSeal allow you to query for files, tags and tasks in your vault using familar SQL syntax. It also enables you to preview any CSV file in your vault as a database. It brings fully featured database into your vault!
Installation
You can install plugin from the Community Plugins directly from Obsidian, just look for SQLSeal in the marketplace.
Manual Instalation
To manually install the package, open Releases and download .zip of the last one. Unzip it in your vault under .obsidian/Plugins/sqlseal.
Usage
Once you install the plugin, you can use it by creating sqlseal codeblocks in your notes. To create table base on the existing CSV file in your vault simply address it using the following command:
TABLE transactions = file(transactions.csv)
SELECT * FROM transactions LIMIT 10
The code above will create table called transactions based on the transactions.csv file from your vault. Further you can refer to it using regular SELECT statements.
You can define multiple tables in a single snippet. You can also point to the tables defined in different snippets within the same note (for now tables stay local to the file).
For more comprehensive documentation head to hypersphere.blog/sql-seal.
Disclaimer
The plugin authors do not take any responsibility for any potential data loss. Always backup your files before usage. This plugin may modify files in your vault in the following situations (the list might not be exhaustive):
- .sql and .sqlseal files: Variable values are saved as comments at the end of these files
- Markdown files: When interacting with task using
taskstable, the plugin will update source markdown files.
Please ensure you have proper backups before using this plugin.
Stay in Touch!
If you have any questions about the project, ideas or want to share your use-cases, join our Discord Channel!