mirror of
https://github.com/h-sphere/sql-seal.git
synced 2026-07-22 05:12:18 +00:00
* feat: add TAGS() macro and auto-detection for multi-tag AND queries
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.
* chore: adding changeset
|
||
|---|---|---|
| .. | ||
| .vitepress | ||
| charts | ||
| contributing | ||
| data-sources | ||
| faq | ||
| langing-page | ||
| plugins/ohm-plugin | ||
| public | ||
| renderers | ||
| changelog.md | ||
| changing-render-method.md | ||
| comments.md | ||
| csv-viewer.md | ||
| csv-viewer_code-gen.png | ||
| csv_viewer_add.png | ||
| csv_viewer_preview.png | ||
| define-column-types.md | ||
| demo-vault.md | ||
| explain.png | ||
| future-plans.md | ||
| index.md | ||
| inline-block.png | ||
| inline-codeblocks.md | ||
| links-and-images-advanced.png | ||
| links-and-images.md | ||
| links.png | ||
| query-configuration.md | ||
| query-markdown-tables.md | ||
| query-vault-content.md | ||
| quick-start.md | ||
| renderer_grid.png | ||
| renderer_grid_advanced.png | ||
| renderer_markdown.png | ||
| renderer_table.png | ||
| setting-column-type.png | ||
| troubleshooting.md | ||
| using-properties.md | ||