dirsql 0.3.119__tar.gz → 0.3.121__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dirsql-0.3.119 → dirsql-0.3.121}/Cargo.lock +1 -1
- {dirsql-0.3.119 → dirsql-0.3.121}/PKG-INFO +1 -1
- {dirsql-0.3.119 → dirsql-0.3.121}/docs/.vitepress/config.ts +1 -0
- dirsql-0.3.121/docs/getting-started.md +248 -0
- dirsql-0.3.121/docs/howto/parse-files-into-columns.md +122 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/docs/howto/write-a-plugin.md +1 -1
- {dirsql-0.3.119/packages/rust → dirsql-0.3.121}/docs/index.md +6 -6
- {dirsql-0.3.119 → dirsql-0.3.121}/docs/reference/cli.md +9 -4
- {dirsql-0.3.119 → dirsql-0.3.121}/docs/reference/hooks.md +11 -0
- {dirsql-0.3.119/packages/rust → dirsql-0.3.121}/docs/reference/http-api.md +1 -1
- {dirsql-0.3.119 → dirsql-0.3.121}/docs/reference/path-tables.md +2 -2
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/Cargo.toml +1 -1
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/docs/.vitepress/config.ts +1 -0
- dirsql-0.3.121/packages/python/docs/getting-started.md +248 -0
- dirsql-0.3.121/packages/python/docs/howto/parse-files-into-columns.md +122 -0
- {dirsql-0.3.119/packages/rust → dirsql-0.3.121/packages/python}/docs/howto/write-a-plugin.md +1 -1
- {dirsql-0.3.119 → dirsql-0.3.121/packages/python}/docs/index.md +6 -6
- {dirsql-0.3.119/packages/rust → dirsql-0.3.121/packages/python}/docs/reference/cli.md +9 -4
- {dirsql-0.3.119/packages/rust → dirsql-0.3.121/packages/python}/docs/reference/hooks.md +11 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/docs/reference/http-api.md +1 -1
- {dirsql-0.3.119/packages/rust → dirsql-0.3.121/packages/python}/docs/reference/path-tables.md +2 -2
- dirsql-0.3.121/packages/python/e2e-attestations/feat-637-init-escalation-example.json +7 -0
- dirsql-0.3.121/packages/rust/changelog.d/2026-07-23-init-escalation-example.md +10 -0
- dirsql-0.3.121/packages/rust/docs/getting-started.md +248 -0
- dirsql-0.3.121/packages/rust/docs/howto/parse-files-into-columns.md +122 -0
- {dirsql-0.3.119/packages/python → dirsql-0.3.121/packages/rust}/docs/howto/write-a-plugin.md +1 -1
- {dirsql-0.3.119/packages/python → dirsql-0.3.121/packages/rust}/docs/index.md +6 -6
- {dirsql-0.3.119/packages/python → dirsql-0.3.121/packages/rust}/docs/reference/cli.md +9 -4
- {dirsql-0.3.119/packages/python → dirsql-0.3.121/packages/rust}/docs/reference/hooks.md +11 -0
- {dirsql-0.3.119 → dirsql-0.3.121/packages/rust}/docs/reference/http-api.md +1 -1
- {dirsql-0.3.119/packages/python → dirsql-0.3.121/packages/rust}/docs/reference/path-tables.md +2 -2
- dirsql-0.3.121/packages/rust/migrations.d/2026-07-23-init-escalation-example.md +64 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/src/bin/dirsql.rs +6 -6
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/src/cli/init.rs +5 -4
- dirsql-0.3.121/packages/rust/src/default_config.toml +33 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/src/lib.rs +6 -5
- dirsql-0.3.119/docs/getting-started.md +0 -256
- dirsql-0.3.119/packages/python/docs/getting-started.md +0 -256
- dirsql-0.3.119/packages/python/e2e-attestations/feat-655-drop-glob-captures.json +0 -7
- dirsql-0.3.119/packages/rust/docs/getting-started.md +0 -256
- dirsql-0.3.119/packages/rust/src/default_config.toml +0 -3
- {dirsql-0.3.119 → dirsql-0.3.121}/Cargo.toml +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/README.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/dirsql/__init__.py +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/dirsql/_async.py +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/dirsql/_dirsql.pyi +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/dirsql/cli/__init__.py +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/dirsql/cli/binary_path.py +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/dirsql/cli/discover_plugins/__init__.py +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/dirsql/cli/discover_plugins/discovered_fragments.py +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/dirsql/cli/discover_plugins/discovery_disabled.py +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/dirsql/cli/discover_plugins/fragment_path.py +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/dirsql/cli/discover_plugins/user_passed_config.py +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/dirsql/cli/discover_plugins/with_discovered_plugins.py +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/dirsql/cli/is_windows.py +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/dirsql/cli/main.py +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/dirsql/cli/resolve_config_extensions.py +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/dirsql/py.typed +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/dirsql/resolve_config_extensions.py +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/dirsql/resolve_extension.py +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/docs/.claude/CLAUDE.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/docs/.vitepress/theme/index.ts +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/docs/.vitepress/theme/lang.ts +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/docs/AGENTS.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/docs/explanation.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/docs/howto/columns-from-paths.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/docs/howto/define-tables.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/docs/howto/embed.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/docs/howto/extract-from-contents.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/docs/howto/load-extension.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/docs/howto/persist.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/docs/howto/query-without-config.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/docs/howto/react-to-changes.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/docs/howto/search-by-meaning.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/docs/howto/skip-files.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/docs/migrations.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/docs/package.json +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/docs/pnpm-lock.yaml +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/docs/pnpm-workspace.yaml +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/docs/reference/columns.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/docs/reference/config.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/docs/reference/sdk.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/CHANGELOG.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/MIGRATIONS.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/README.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/changelog.d/2026-07-13-drop-cwd-config-auto-detect.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/changelog.d/2026-07-13-plugin-discovery.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/changelog.d/2026-07-13-rename-extract-to-on-file.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/changelog.d/2026-07-13-repeatable-config.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/changelog.d/2026-07-13-sdk-default-baked-in-config.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/changelog.d/2026-07-20-drop-implicit-files-table.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/changelog.d/2026-07-21-remove-glob-captures.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/changelog.d/README.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/conftest.py +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/docs/.claude/CLAUDE.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/docs/.vitepress/theme/index.ts +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/docs/.vitepress/theme/lang.ts +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/docs/AGENTS.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/docs/explanation.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/docs/howto/columns-from-paths.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/docs/howto/define-tables.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/docs/howto/embed.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/docs/howto/extract-from-contents.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/docs/howto/load-extension.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/docs/howto/persist.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/docs/howto/query-without-config.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/docs/howto/react-to-changes.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/docs/howto/search-by-meaning.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/docs/howto/skip-files.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/docs/migrations.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/docs/package.json +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/docs/pnpm-lock.yaml +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/docs/pnpm-workspace.yaml +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/docs/reference/columns.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/docs/reference/config.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/docs/reference/sdk.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/e2e-attestations/feat-631-on-file-flag.json +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/migrations.d/2026-07-13-drop-cwd-config-auto-detect.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/migrations.d/2026-07-13-rename-extract-to-on-file.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/migrations.d/2026-07-13-sdk-default-baked-in-config.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/migrations.d/2026-07-20-drop-implicit-files-table.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/migrations.d/2026-07-21-remove-glob-captures.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/migrations.d/README.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/src/lib.rs +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/tests/__init__.py +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/tests/conftest.py +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/tests/e2e/__init__.py +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/tests/e2e/fixtures/dirsql_plugin_fixture/__init__.py +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/tests/e2e/fixtures/dirsql_plugin_fixture/dirsql.toml +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/tests/integration/__init__.py +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/tests/integration/binding/__init__.py +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/python/tests/integration/hermetic/__init__.py +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/CHANGELOG.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/Cargo.toml +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/MIGRATIONS.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/README.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/benches/db_bench.rs +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/benches/differ_bench.rs +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/benches/matcher_bench.rs +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/benches/scanner_bench.rs +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/changelog.d/2026-07-13-batch-ingest-transaction.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/changelog.d/2026-07-13-chained-pre-post-query-hooks.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/changelog.d/2026-07-13-drop-cwd-config-auto-detect.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/changelog.d/2026-07-13-fan-out-file-table-matching.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/changelog.d/2026-07-13-persist-wal.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/changelog.d/2026-07-13-rename-extract-to-on-file.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/changelog.d/2026-07-13-repeatable-builder-config.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/changelog.d/2026-07-13-repeatable-cli-config.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/changelog.d/2026-07-13-sdk-default-baked-in-config.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/changelog.d/2026-07-13-subcommand-local-config-flags.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/changelog.d/2026-07-19-path-table-query-fallback.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/changelog.d/2026-07-19-path-table-vtab.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/changelog.d/2026-07-20-drop-implicit-files-table.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/changelog.d/2026-07-20-path-table-glob-semantics.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/changelog.d/2026-07-20-schema-inference.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/changelog.d/2026-07-21-on-file-flag.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/changelog.d/2026-07-21-remove-glob-captures.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/changelog.d/README.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/docs/explanation.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/docs/howto/columns-from-paths.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/docs/howto/define-tables.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/docs/howto/embed.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/docs/howto/extract-from-contents.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/docs/howto/load-extension.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/docs/howto/persist.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/docs/howto/query-without-config.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/docs/howto/react-to-changes.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/docs/howto/search-by-meaning.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/docs/howto/skip-files.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/docs/migrations.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/docs/reference/columns.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/docs/reference/config.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/docs/reference/sdk.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/migrations.d/2026-07-13-drop-cwd-config-auto-detect.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/migrations.d/2026-07-13-fan-out-file-table-matching.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/migrations.d/2026-07-13-persist-wal.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/migrations.d/2026-07-13-rename-extract-to-on-file.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/migrations.d/2026-07-13-sdk-default-baked-in-config.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/migrations.d/2026-07-13-subcommand-local-config-flags.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/migrations.d/2026-07-20-drop-implicit-files-table.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/migrations.d/2026-07-20-path-table-glob-semantics.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/migrations.d/2026-07-21-remove-glob-captures.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/migrations.d/README.md +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/src/cli/execute.rs +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/src/cli/mod.rs +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/src/cli/router.rs +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/src/cli/serialize.rs +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/src/cli/server.rs +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/src/command.rs +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/src/config.rs +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/src/db.rs +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/src/differ.rs +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/src/infer.rs +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/src/matcher.rs +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/src/parsed_vtab.rs +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/src/path_table.rs +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/src/persist.rs +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/src/scanner.rs +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/src/vtab.rs +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/packages/rust/src/watcher.rs +0 -0
- {dirsql-0.3.119 → dirsql-0.3.121}/pyproject.toml +0 -0
|
@@ -41,6 +41,7 @@ export default defineConfig({
|
|
|
41
41
|
{ text: 'Define tables for your files', link: '/howto/define-tables' },
|
|
42
42
|
{ text: 'Derive columns from file paths', link: '/howto/columns-from-paths' },
|
|
43
43
|
{ text: 'Extract rows from file contents', link: '/howto/extract-from-contents' },
|
|
44
|
+
{ text: 'Parse your files into columns', link: '/howto/parse-files-into-columns' },
|
|
44
45
|
{ text: 'Search documents by meaning', link: '/howto/search-by-meaning' },
|
|
45
46
|
{ text: "Skip files you don't want indexed", link: '/howto/skip-files' },
|
|
46
47
|
{ text: 'Load a SQLite extension', link: '/howto/load-extension' },
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
# Your first dirsql database
|
|
2
|
+
|
|
3
|
+
In this tutorial you will turn a directory of three tiny markdown files into
|
|
4
|
+
a SQL database — with a single command, and without writing any code. You
|
|
5
|
+
will:
|
|
6
|
+
|
|
7
|
+
1. Create the directory and files.
|
|
8
|
+
2. Query them straight away with zero configuration.
|
|
9
|
+
3. Declare your own table to name and reuse a shape, and query it.
|
|
10
|
+
|
|
11
|
+
It takes about five minutes.
|
|
12
|
+
|
|
13
|
+
`dirsql` only ever reads your files — it never writes, moves, or changes
|
|
14
|
+
them — so it is safe to point at a real directory of your own once you are
|
|
15
|
+
done here. See [Read-only by design](./explanation#read-only-by-design).
|
|
16
|
+
|
|
17
|
+
**You need:** a terminal with [`jq`](https://jqlang.org/), and Node ≥ 20.11
|
|
18
|
+
(for `npx`). Every `npx dirsql` step below also has a `uvx` tab that behaves
|
|
19
|
+
identically, if you prefer Python tooling
|
|
20
|
+
([`uv`](https://docs.astral.sh/uv/)).
|
|
21
|
+
|
|
22
|
+
## 1. Create three files
|
|
23
|
+
|
|
24
|
+
Paste this whole block into your terminal. It makes a working directory
|
|
25
|
+
with a subfolder per note author and writes three tiny markdown notes:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
mkdir -p my-notes/notes/alice my-notes/notes/bob
|
|
29
|
+
cd my-notes
|
|
30
|
+
cat > notes/alice/welcome.md <<'EOF'
|
|
31
|
+
# Welcome
|
|
32
|
+
|
|
33
|
+
Start here. This folder is about to become a database.
|
|
34
|
+
EOF
|
|
35
|
+
cat > notes/alice/ideas.md <<'EOF'
|
|
36
|
+
# Ideas
|
|
37
|
+
|
|
38
|
+
- query files with SQL
|
|
39
|
+
- watch for changes
|
|
40
|
+
EOF
|
|
41
|
+
cat > notes/bob/reading-list.md <<'EOF'
|
|
42
|
+
# Reading list
|
|
43
|
+
|
|
44
|
+
- The SQLite file format
|
|
45
|
+
EOF
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
(Any directory of files works with `dirsql` — the rest of this tutorial
|
|
49
|
+
assumes exactly these three so your output matches ours.)
|
|
50
|
+
|
|
51
|
+
Check that all three files are in place:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
find notes -type f | sort
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
notes/alice/ideas.md
|
|
59
|
+
notes/alice/welcome.md
|
|
60
|
+
notes/bob/reading-list.md
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## 2. Query your files
|
|
64
|
+
|
|
65
|
+
You wrote no configuration and no schema. Ask `dirsql` how many files are in
|
|
66
|
+
this directory anyway — from inside `my-notes`, run one command:
|
|
67
|
+
|
|
68
|
+
::: code-group
|
|
69
|
+
|
|
70
|
+
```bash [npm]
|
|
71
|
+
npx dirsql query "SELECT COUNT(*) AS files FROM './'"
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
```bash [PyPI]
|
|
75
|
+
uvx dirsql query "SELECT COUNT(*) AS files FROM './'"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
:::
|
|
79
|
+
|
|
80
|
+
The first run downloads the package (`npx` asks for confirmation — answer
|
|
81
|
+
`y`; `uvx` prints download progress), then prints the result:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
[{"files":3}]
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Three files, three rows. That one command scanned the directory, handed
|
|
88
|
+
SQLite one row per file, ran your SQL, and printed the answer as JSON.
|
|
89
|
+
|
|
90
|
+
There is no named table here — you never declared one. `'./'` is a
|
|
91
|
+
[path-table](./reference/path-tables.md): a quoted path written where a table
|
|
92
|
+
name goes. `'./'` means everything under the directory you ran the command
|
|
93
|
+
in. The path *is* the query.
|
|
94
|
+
|
|
95
|
+
## 3. Select some columns
|
|
96
|
+
|
|
97
|
+
The response is always a JSON array of row objects, so from here on we pipe
|
|
98
|
+
it through `jq` to pretty-print. Ask for two columns instead of a count:
|
|
99
|
+
|
|
100
|
+
::: code-group
|
|
101
|
+
|
|
102
|
+
```bash [npm]
|
|
103
|
+
npx dirsql query "SELECT path, size FROM './' ORDER BY path" | jq
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
```bash [PyPI]
|
|
107
|
+
uvx dirsql query "SELECT path, size FROM './' ORDER BY path" | jq
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
:::
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
[
|
|
114
|
+
{
|
|
115
|
+
"path": "notes/alice/ideas.md",
|
|
116
|
+
"size": 52
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"path": "notes/alice/welcome.md",
|
|
120
|
+
"size": 66
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"path": "notes/bob/reading-list.md",
|
|
124
|
+
"size": 41
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
`path` and `size` are two of the built-in file columns `dirsql` collects for
|
|
130
|
+
every file — see [stat columns](./reference/columns.md#stat-columns) for the
|
|
131
|
+
full list. (The `size` values are byte counts; they match the output above
|
|
132
|
+
because you pasted the files exactly.)
|
|
133
|
+
|
|
134
|
+
You have a working SQL database over your files, and you never left the
|
|
135
|
+
command line.
|
|
136
|
+
|
|
137
|
+
## 4. Declare a table
|
|
138
|
+
|
|
139
|
+
A declared table fixes a shape once: you give it a name, scope it to exactly
|
|
140
|
+
the files you care about, and then query it by name instead of repeating a
|
|
141
|
+
path in every question. It is also the on-ramp to everything a path-table
|
|
142
|
+
can't do — a named table can be kept live by the watcher, persisted across
|
|
143
|
+
restarts, and given a parser that reads inside your files.
|
|
144
|
+
|
|
145
|
+
Still inside `my-notes`, create a `.dirsql.toml`:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
cat > .dirsql.toml <<'EOF'
|
|
149
|
+
[[table]]
|
|
150
|
+
ddl = "CREATE TABLE notes (dir TEXT, basename TEXT, size INTEGER)"
|
|
151
|
+
glob = "notes/**/*.md"
|
|
152
|
+
EOF
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Two keys define the table:
|
|
156
|
+
|
|
157
|
+
- `glob` selects which files feed the table — every `.md` at any depth under
|
|
158
|
+
`notes/`, relative to the directory the config sits in.
|
|
159
|
+
- `ddl` is ordinary `CREATE TABLE` SQL naming the columns you want to keep.
|
|
160
|
+
Each is a [stat column](./reference/columns.md#stat-columns) `dirsql`
|
|
161
|
+
computes for every file.
|
|
162
|
+
|
|
163
|
+
## 5. Query the table
|
|
164
|
+
|
|
165
|
+
`dirsql` does not auto-load a `.dirsql.toml` from the current directory, so
|
|
166
|
+
pass it explicitly with `-c`, **after** the SQL:
|
|
167
|
+
|
|
168
|
+
::: code-group
|
|
169
|
+
|
|
170
|
+
```bash [npm]
|
|
171
|
+
npx dirsql query "SELECT dir, basename, size FROM notes ORDER BY dir, basename" -c .dirsql.toml | jq
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
```bash [PyPI]
|
|
175
|
+
uvx dirsql query "SELECT dir, basename, size FROM notes ORDER BY dir, basename" -c .dirsql.toml | jq
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
:::
|
|
179
|
+
|
|
180
|
+
```json
|
|
181
|
+
[
|
|
182
|
+
{
|
|
183
|
+
"basename": "ideas.md",
|
|
184
|
+
"dir": "notes/alice",
|
|
185
|
+
"size": 52
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"basename": "welcome.md",
|
|
189
|
+
"dir": "notes/alice",
|
|
190
|
+
"size": 66
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"basename": "reading-list.md",
|
|
194
|
+
"dir": "notes/bob",
|
|
195
|
+
"size": 41
|
|
196
|
+
}
|
|
197
|
+
]
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
You queried `FROM notes` by name — no path, no glob to repeat. And because
|
|
201
|
+
`dir` is a real SQL column, you can aggregate on it. Count each author's
|
|
202
|
+
notes by their folder:
|
|
203
|
+
|
|
204
|
+
::: code-group
|
|
205
|
+
|
|
206
|
+
```bash [npm]
|
|
207
|
+
npx dirsql query "SELECT dir, COUNT(*) AS notes FROM notes GROUP BY dir ORDER BY dir" -c .dirsql.toml | jq
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
```bash [PyPI]
|
|
211
|
+
uvx dirsql query "SELECT dir, COUNT(*) AS notes FROM notes GROUP BY dir ORDER BY dir" -c .dirsql.toml | jq
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
:::
|
|
215
|
+
|
|
216
|
+
```json
|
|
217
|
+
[
|
|
218
|
+
{
|
|
219
|
+
"dir": "notes/alice",
|
|
220
|
+
"notes": 2
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"dir": "notes/bob",
|
|
224
|
+
"notes": 1
|
|
225
|
+
}
|
|
226
|
+
]
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
That's the whole loop: files in a directory, an instant query with no
|
|
230
|
+
configuration, and a declared table when you want a named shape to reuse.
|
|
231
|
+
|
|
232
|
+
## Where to go next
|
|
233
|
+
|
|
234
|
+
- [Query files without a config](./howto/query-without-config.md) — more
|
|
235
|
+
path-table questions you can ask with no setup at all.
|
|
236
|
+
- [Define tables for your files](./howto/define-tables.md) — the full
|
|
237
|
+
`[[table]]` recipe: multiple tables, ignore patterns.
|
|
238
|
+
- [Extract rows from file contents](./howto/extract-from-contents.md) —
|
|
239
|
+
pull columns out of *inside* your files with an `on-file` parser.
|
|
240
|
+
- [CLI](./reference/cli.md) — every flag, plus running `dirsql` as a
|
|
241
|
+
long-lived HTTP server instead of one-shot queries.
|
|
242
|
+
- [HTTP API](./reference/http-api.md) — `POST /query`, plus `GET /events`,
|
|
243
|
+
a live stream of row changes as files change.
|
|
244
|
+
- [SDK](./reference/sdk.md) — embed `dirsql` in a Python, Rust, or
|
|
245
|
+
TypeScript program instead of running the CLI.
|
|
246
|
+
- Why is the database rebuilt from your files on every query? See
|
|
247
|
+
[how `dirsql` thinks](./explanation.md).
|
|
248
|
+
```
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Parse your files into columns
|
|
2
|
+
|
|
3
|
+
A [path-table](../reference/path-tables.md) gives you one row per file, with the
|
|
4
|
+
stat columns (`path`, `size`, `mtime`, …). When the columns you actually want
|
|
5
|
+
live *inside* each file, attach a parser with
|
|
6
|
+
[`--on-file`](../reference/cli.md#on-file-command): prototype it inline on the
|
|
7
|
+
path-table, then paste the **same** command into a config file the day you want
|
|
8
|
+
a watcher, persistence, or more than one table. The parser command never
|
|
9
|
+
changes across that move — that is the whole point.
|
|
10
|
+
|
|
11
|
+
## 1. Start from a bare path-table
|
|
12
|
+
|
|
13
|
+
You have a directory of Markdown posts with YAML frontmatter:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
posts/hello-world.md
|
|
17
|
+
posts/on-recursion.md
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
A path-table already answers questions about the files themselves:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
dirsql query "SELECT basename, size FROM './posts/*.md' ORDER BY basename"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
[{"basename":"hello-world.md","size":65},{"basename":"on-recursion.md","size":102}]
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
But `title` and `author` are inside the frontmatter, not in the stat columns.
|
|
31
|
+
To get them, you need a parser.
|
|
32
|
+
|
|
33
|
+
## 2. Attach a parser with `--on-file`
|
|
34
|
+
|
|
35
|
+
Any program that reads one file and prints a **JSON array of row objects** on
|
|
36
|
+
stdout is a parser. Here is a small one, `extract.py`, that reads a post's
|
|
37
|
+
frontmatter:
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
#!/usr/bin/env python3
|
|
41
|
+
import json, re, sys
|
|
42
|
+
|
|
43
|
+
text = open(sys.argv[1], encoding="utf-8").read()
|
|
44
|
+
m = re.match(r"^---\n(.*?)\n---", text, re.DOTALL)
|
|
45
|
+
fields = dict(
|
|
46
|
+
(k.strip(), v.strip())
|
|
47
|
+
for k, _, v in (line.partition(":") for line in (m.group(1).splitlines() if m else []))
|
|
48
|
+
)
|
|
49
|
+
print(json.dumps([{"title": fields.get("title"), "author": fields.get("author")}]))
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Point the path-table at it with `--on-file`:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
dirsql query "SELECT title, author FROM './posts/*.md' ORDER BY title" \
|
|
56
|
+
--on-file 'python3 extract.py {path}'
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
[{"author":"Ada Lovelace","title":"Hello World"},{"author":"Alan Turing","title":"On Recursion"}]
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Now the parser's output *is* the table. `--on-file` runs the command once per
|
|
64
|
+
matched file; `{path}` is the file's absolute path, one of the placeholders in
|
|
65
|
+
the shared [`on-file` hook contract](../reference/hooks.md#on-file) (argv
|
|
66
|
+
splitting, timeout, and per-file failure isolation all come from there). The
|
|
67
|
+
stat columns are no longer reachable — a parser that wants the path emits it,
|
|
68
|
+
since it already has `{path}`. See
|
|
69
|
+
[Parsing rows with `--on-file`](../reference/path-tables.md#parsing-rows-with-on-file)
|
|
70
|
+
for the full behavior.
|
|
71
|
+
|
|
72
|
+
`--on-file` applies to every path-table in the query and may be given at most
|
|
73
|
+
once. It is a `query`-only flag: there is no config file involved yet, so it is
|
|
74
|
+
the fastest way to see whether a parser produces the rows you expect.
|
|
75
|
+
|
|
76
|
+
## 3. Graduate to a config file
|
|
77
|
+
|
|
78
|
+
The inline flag re-scans and re-parses every file on every query, defines one
|
|
79
|
+
parser for the whole query, and forgets everything when the process exits. When
|
|
80
|
+
you want a **watcher** that keeps the rows fresh, **persistence** across
|
|
81
|
+
restarts, or **different parsers for different file sets**, move the parser into
|
|
82
|
+
a `.dirsql.toml` [`[[table]]`](../reference/config.md#table) — and paste the
|
|
83
|
+
command in verbatim:
|
|
84
|
+
|
|
85
|
+
```toml
|
|
86
|
+
[[table]]
|
|
87
|
+
ddl = "CREATE TABLE posts (title TEXT, author TEXT)"
|
|
88
|
+
glob = "posts/*.md"
|
|
89
|
+
on-file = "python3 extract.py {path}"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
The `on-file` value is byte-for-byte the string you passed to `--on-file`. The
|
|
93
|
+
[`on-file` hook contract](../reference/hooks.md#on-file) is the same contract
|
|
94
|
+
the flag used — the flag and the config key are two spellings of the same
|
|
95
|
+
attachment. What you gain by moving to config is everything around the parser:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
dirsql query "SELECT title, author FROM posts ORDER BY title" -c ./.dirsql.toml
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
[{"author":"Ada Lovelace","title":"Hello World"},{"author":"Alan Turing","title":"On Recursion"}]
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Same command, same rows. The difference is what a declared table brings: it is
|
|
106
|
+
indexed on build, kept fresh by the watcher, survives restarts with
|
|
107
|
+
[`--persist`](./persist.md), and a config can declare
|
|
108
|
+
[many tables](./define-tables.md) — each with its own `on-file` — where the flag
|
|
109
|
+
gives every path-table one parser. A declared table also merges the filesystem
|
|
110
|
+
facts back onto each row, so a `path TEXT` column in the DDL is populated by
|
|
111
|
+
`dirsql` even though the parser did not emit it
|
|
112
|
+
([precedence](../reference/columns.md#precedence)).
|
|
113
|
+
|
|
114
|
+
## Going further
|
|
115
|
+
|
|
116
|
+
- The full stat-vs-parsed behavior, failure isolation, and skip rules:
|
|
117
|
+
[Parsing rows with `--on-file`](../reference/path-tables.md#parsing-rows-with-on-file).
|
|
118
|
+
- Starting from a declared table instead of a path-table?
|
|
119
|
+
[Extract rows from file contents](./extract-from-contents.md) covers the
|
|
120
|
+
config-first path.
|
|
121
|
+
- One row per record *within* a file (JSONL, multiple frontmatter blocks): the
|
|
122
|
+
parser prints one object per row — the array length is the row count.
|
|
@@ -217,7 +217,7 @@ Discovery is deliberately narrow. Know exactly who does what:
|
|
|
217
217
|
your config still takes ordering precedence
|
|
218
218
|
([composing configs](../reference/config.md#composing-multiple-configs)). When
|
|
219
219
|
you pass no `-c` of your own, the launcher also keeps the
|
|
220
|
-
shipped starter `
|
|
220
|
+
shipped starter `records` table (an internal `--include-default`), so plugins
|
|
221
221
|
**add** tables rather than standing alone. Discovery is **pip/uvx only** for now — the `npx`
|
|
222
222
|
launcher does not yet discover — and is switched off per invocation with
|
|
223
223
|
[`--no-plugin` or `DIRSQL_NO_PLUGIN=1`](../reference/cli.md#plugins).
|
|
@@ -34,7 +34,7 @@ db = DirSQL(
|
|
|
34
34
|
"./my-project",
|
|
35
35
|
tables=[
|
|
36
36
|
Table(
|
|
37
|
-
ddl="CREATE TABLE
|
|
37
|
+
ddl="CREATE TABLE records (name TEXT, size INTEGER, type TEXT)",
|
|
38
38
|
glob="data/*.json",
|
|
39
39
|
on_file=lambda path: [json.loads(open(path, encoding="utf-8").read())],
|
|
40
40
|
),
|
|
@@ -42,7 +42,7 @@ db = DirSQL(
|
|
|
42
42
|
)
|
|
43
43
|
|
|
44
44
|
# SQL queries over your filesystem
|
|
45
|
-
large = db.query("SELECT * FROM
|
|
45
|
+
large = db.query("SELECT * FROM records WHERE size > 1000")
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
```rust [Rust]
|
|
@@ -52,14 +52,14 @@ let db = DirSQL::new(
|
|
|
52
52
|
"./my-project",
|
|
53
53
|
vec![
|
|
54
54
|
Table::new(
|
|
55
|
-
"CREATE TABLE
|
|
55
|
+
"CREATE TABLE records (name TEXT, size INTEGER, type TEXT)",
|
|
56
56
|
"data/*.json",
|
|
57
57
|
|path| vec![serde_json::from_str(&std::fs::read_to_string(path).unwrap()).unwrap()],
|
|
58
58
|
),
|
|
59
59
|
],
|
|
60
60
|
)?;
|
|
61
61
|
|
|
62
|
-
let large = db.query("SELECT * FROM
|
|
62
|
+
let large = db.query("SELECT * FROM records WHERE size > 1000")?;
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
```typescript [TypeScript]
|
|
@@ -70,14 +70,14 @@ const db = new DirSQL({
|
|
|
70
70
|
root: './my-project',
|
|
71
71
|
tables: [
|
|
72
72
|
new Table({
|
|
73
|
-
ddl: 'CREATE TABLE
|
|
73
|
+
ddl: 'CREATE TABLE records (name TEXT, size INTEGER, type TEXT)',
|
|
74
74
|
glob: 'data/*.json',
|
|
75
75
|
onFile: (path) => [JSON.parse(readFileSync(path, 'utf8'))],
|
|
76
76
|
}),
|
|
77
77
|
],
|
|
78
78
|
});
|
|
79
79
|
|
|
80
|
-
const large = await db.query('SELECT * FROM
|
|
80
|
+
const large = await db.query('SELECT * FROM records WHERE size > 1000');
|
|
81
81
|
```
|
|
82
82
|
|
|
83
83
|
:::
|
|
@@ -168,7 +168,9 @@ timeout. The parser's output is the whole schema; the stat columns are not
|
|
|
168
168
|
reachable on a parsed path-table. `--on-file` may be given **at most once** (a
|
|
169
169
|
repeat is an error pointing at config files) and never touches config-declared
|
|
170
170
|
tables. It is a `query`-only flag — server mode rejects it as an unknown
|
|
171
|
-
argument.
|
|
171
|
+
argument. The command string is copy-paste identical to a `[[table]]`
|
|
172
|
+
`on-file` key, so an inline parser graduates to a config file unchanged — see
|
|
173
|
+
[Parse your files into columns](../howto/parse-files-into-columns.md).
|
|
172
174
|
|
|
173
175
|
Errors print the same diagnostic the HTTP `{"error": …}` body carries —
|
|
174
176
|
config failures, SQL errors, rejected reads, hook failures, timeouts — to
|
|
@@ -183,8 +185,11 @@ stderr, with exit code `1`.
|
|
|
183
185
|
|
|
184
186
|
## `dirsql init`
|
|
185
187
|
|
|
186
|
-
Writes a starter `.dirsql.toml`
|
|
187
|
-
|
|
188
|
+
Writes a starter `.dirsql.toml` as a scaffold to edit. It does **not**
|
|
189
|
+
duplicate the zero-config floor (`SELECT * FROM './'` already lists every file
|
|
190
|
+
with no config); instead it shows the **escalation**: one named `[[table]]`
|
|
191
|
+
with a glob, a schema, and a real `on-file` hook that pulls structured rows
|
|
192
|
+
out of your files.
|
|
188
193
|
|
|
189
194
|
```bash
|
|
190
195
|
dirsql init
|
|
@@ -225,7 +230,7 @@ installed in the same environment as `dirsql` (`pip install …`, or
|
|
|
225
230
|
loads its fragment — its tables are queryable with zero config edits.
|
|
226
231
|
Installed = active: there is no enable step and no naming convention. The
|
|
227
232
|
fragment is composed *after* your own `-c` configs (so your config takes
|
|
228
|
-
precedence in ordering), and the shipped starter `
|
|
233
|
+
precedence in ordering), and the shipped starter `records` table is preserved.
|
|
229
234
|
|
|
230
235
|
Discovery is **launcher-only** — the standalone `cargo`-installed binary does no
|
|
231
236
|
discovery, and the SDKs never auto-discover (pass a plugin's config explicitly
|
|
@@ -99,6 +99,17 @@ every watched change. The command reads the file itself and prints a JSON
|
|
|
99
99
|
array of row objects; see [`[[table]]`](./config.md#table) for the
|
|
100
100
|
row-mapping rules.
|
|
101
101
|
|
|
102
|
+
The same command is attachable two ways, over the same contract: the
|
|
103
|
+
`on-file` config key on a `[[table]]`, and the
|
|
104
|
+
[`--on-file <command>`](./cli.md#on-file-command) flag on `dirsql query`,
|
|
105
|
+
which attaches it to every [path-table](./path-tables.md#parsing-rows-with-on-file)
|
|
106
|
+
in the query. The command string is identical between the two spellings — the
|
|
107
|
+
flag is the inline form, the config key the declared form (see
|
|
108
|
+
[Parse your files into columns](../howto/parse-files-into-columns.md)). The one
|
|
109
|
+
behavioral difference is not in this contract but in the surrounding table: a
|
|
110
|
+
declared `[[table]]` merges the filesystem facts onto each parsed row, while a
|
|
111
|
+
parsed path-table exposes only the parser's output.
|
|
112
|
+
|
|
102
113
|
| Placeholder | Value |
|
|
103
114
|
|---|---|
|
|
104
115
|
| `{path}` | The matched file's **absolute** path. `on-file = "extract.py {path}"` — self-sufficient from any working directory, so the command resolves it even when the config lives outside the index. |
|
|
@@ -27,7 +27,7 @@ The `200` response is a JSON array of row objects keyed by column name:
|
|
|
27
27
|
```bash
|
|
28
28
|
curl -s http://localhost:7117/query \
|
|
29
29
|
-H 'content-type: application/json' \
|
|
30
|
-
-d '{"sql":"SELECT COUNT(*) AS n FROM
|
|
30
|
+
-d '{"sql":"SELECT COUNT(*) AS n FROM \'./\'"}' \
|
|
31
31
|
| jq
|
|
32
32
|
```
|
|
33
33
|
|
|
@@ -198,9 +198,9 @@ pattern if you would rather not see them.
|
|
|
198
198
|
Path-tables are ordinary SQLite tables once resolved, so they join freely:
|
|
199
199
|
|
|
200
200
|
```sql
|
|
201
|
-
SELECT p.basename,
|
|
201
|
+
SELECT p.basename, d.size
|
|
202
202
|
FROM './docs/*.md' AS p
|
|
203
|
-
JOIN
|
|
203
|
+
JOIN pages AS d ON d.path = p.path;
|
|
204
204
|
```
|
|
205
205
|
|
|
206
206
|
A zero-match path-table is not an error — it is an empty table, and the query
|
|
@@ -4,7 +4,7 @@ name = "dirsql-py-ext"
|
|
|
4
4
|
# pypi/maturin handler can rewrite it via `write-version` before
|
|
5
5
|
# `maturin build`. `pyproject.toml` declares `dynamic = ["version"]`
|
|
6
6
|
# and maturin reads this field. Mirrors `packages/rust/Cargo.toml`.
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.121"
|
|
8
8
|
# abi3 note: the `abi3-py311` pyo3 feature (below) builds ONE stable-ABI
|
|
9
9
|
# `cp311-abi3` wheel per platform that loads on every CPython >= 3.11
|
|
10
10
|
# (matching `pyproject.toml`'s `requires-python = ">=3.11"`), instead of
|
|
@@ -41,6 +41,7 @@ export default defineConfig({
|
|
|
41
41
|
{ text: 'Define tables for your files', link: '/howto/define-tables' },
|
|
42
42
|
{ text: 'Derive columns from file paths', link: '/howto/columns-from-paths' },
|
|
43
43
|
{ text: 'Extract rows from file contents', link: '/howto/extract-from-contents' },
|
|
44
|
+
{ text: 'Parse your files into columns', link: '/howto/parse-files-into-columns' },
|
|
44
45
|
{ text: 'Search documents by meaning', link: '/howto/search-by-meaning' },
|
|
45
46
|
{ text: "Skip files you don't want indexed", link: '/howto/skip-files' },
|
|
46
47
|
{ text: 'Load a SQLite extension', link: '/howto/load-extension' },
|