dirsql 0.3.118__tar.gz → 0.3.120__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.118 → dirsql-0.3.120}/Cargo.lock +1 -1
- {dirsql-0.3.118 → dirsql-0.3.120}/PKG-INFO +1 -1
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/howto/write-a-plugin.md +1 -1
- {dirsql-0.3.118/packages/rust → dirsql-0.3.120}/docs/reference/cli.md +25 -3
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/reference/path-tables.md +33 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/Cargo.toml +1 -1
- {dirsql-0.3.118/packages/rust → dirsql-0.3.120/packages/python}/docs/howto/write-a-plugin.md +1 -1
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/reference/cli.md +25 -3
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/reference/path-tables.md +33 -0
- dirsql-0.3.120/packages/python/e2e-attestations/feat-631-on-file-flag.json +7 -0
- dirsql-0.3.120/packages/python/e2e-attestations/feat-637-init-escalation-example.json +7 -0
- dirsql-0.3.120/packages/rust/changelog.d/2026-07-21-on-file-flag.md +14 -0
- dirsql-0.3.120/packages/rust/changelog.d/2026-07-23-init-escalation-example.md +10 -0
- {dirsql-0.3.118/packages/python → dirsql-0.3.120/packages/rust}/docs/howto/write-a-plugin.md +1 -1
- {dirsql-0.3.118 → dirsql-0.3.120/packages/rust}/docs/reference/cli.md +25 -3
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/docs/reference/path-tables.md +33 -0
- dirsql-0.3.120/packages/rust/migrations.d/2026-07-23-init-escalation-example.md +64 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/src/bin/dirsql.rs +137 -12
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/src/cli/init.rs +5 -4
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/src/db.rs +103 -12
- dirsql-0.3.120/packages/rust/src/default_config.toml +33 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/src/lib.rs +75 -5
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/src/parsed_vtab.rs +139 -63
- dirsql-0.3.118/packages/python/e2e-attestations/feat-628-path-table-glob-semantics.json +0 -7
- dirsql-0.3.118/packages/python/e2e-attestations/feat-655-drop-glob-captures.json +0 -7
- dirsql-0.3.118/packages/rust/src/default_config.toml +0 -3
- {dirsql-0.3.118 → dirsql-0.3.120}/Cargo.toml +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/README.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/dirsql/__init__.py +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/dirsql/_async.py +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/dirsql/_dirsql.pyi +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/dirsql/cli/__init__.py +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/dirsql/cli/binary_path.py +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/dirsql/cli/discover_plugins/__init__.py +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/dirsql/cli/discover_plugins/discovered_fragments.py +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/dirsql/cli/discover_plugins/discovery_disabled.py +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/dirsql/cli/discover_plugins/fragment_path.py +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/dirsql/cli/discover_plugins/user_passed_config.py +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/dirsql/cli/discover_plugins/with_discovered_plugins.py +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/dirsql/cli/is_windows.py +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/dirsql/cli/main.py +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/dirsql/cli/resolve_config_extensions.py +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/dirsql/py.typed +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/dirsql/resolve_config_extensions.py +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/dirsql/resolve_extension.py +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/.claude/CLAUDE.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/.vitepress/config.ts +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/.vitepress/theme/index.ts +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/.vitepress/theme/lang.ts +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/AGENTS.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/explanation.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/getting-started.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/howto/columns-from-paths.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/howto/define-tables.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/howto/embed.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/howto/extract-from-contents.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/howto/load-extension.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/howto/persist.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/howto/query-without-config.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/howto/react-to-changes.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/howto/search-by-meaning.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/howto/skip-files.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/index.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/migrations.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/package.json +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/pnpm-lock.yaml +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/pnpm-workspace.yaml +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/reference/columns.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/reference/config.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/reference/hooks.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/reference/http-api.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/docs/reference/sdk.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/CHANGELOG.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/MIGRATIONS.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/README.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/changelog.d/2026-07-13-drop-cwd-config-auto-detect.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/changelog.d/2026-07-13-plugin-discovery.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/changelog.d/2026-07-13-rename-extract-to-on-file.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/changelog.d/2026-07-13-repeatable-config.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/changelog.d/2026-07-13-sdk-default-baked-in-config.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/changelog.d/2026-07-20-drop-implicit-files-table.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/changelog.d/2026-07-21-remove-glob-captures.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/changelog.d/README.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/conftest.py +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/.claude/CLAUDE.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/.vitepress/config.ts +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/.vitepress/theme/index.ts +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/.vitepress/theme/lang.ts +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/AGENTS.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/explanation.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/getting-started.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/howto/columns-from-paths.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/howto/define-tables.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/howto/embed.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/howto/extract-from-contents.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/howto/load-extension.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/howto/persist.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/howto/query-without-config.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/howto/react-to-changes.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/howto/search-by-meaning.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/howto/skip-files.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/index.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/migrations.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/package.json +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/pnpm-lock.yaml +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/pnpm-workspace.yaml +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/reference/columns.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/reference/config.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/reference/hooks.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/reference/http-api.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/docs/reference/sdk.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/migrations.d/2026-07-13-drop-cwd-config-auto-detect.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/migrations.d/2026-07-13-rename-extract-to-on-file.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/migrations.d/2026-07-13-sdk-default-baked-in-config.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/migrations.d/2026-07-20-drop-implicit-files-table.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/migrations.d/2026-07-21-remove-glob-captures.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/migrations.d/README.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/src/lib.rs +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/tests/__init__.py +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/tests/conftest.py +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/tests/e2e/__init__.py +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/tests/e2e/fixtures/dirsql_plugin_fixture/__init__.py +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/tests/e2e/fixtures/dirsql_plugin_fixture/dirsql.toml +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/tests/integration/__init__.py +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/tests/integration/binding/__init__.py +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/python/tests/integration/hermetic/__init__.py +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/CHANGELOG.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/Cargo.toml +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/MIGRATIONS.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/README.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/benches/db_bench.rs +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/benches/differ_bench.rs +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/benches/matcher_bench.rs +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/benches/scanner_bench.rs +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/changelog.d/2026-07-13-batch-ingest-transaction.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/changelog.d/2026-07-13-chained-pre-post-query-hooks.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/changelog.d/2026-07-13-drop-cwd-config-auto-detect.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/changelog.d/2026-07-13-fan-out-file-table-matching.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/changelog.d/2026-07-13-persist-wal.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/changelog.d/2026-07-13-rename-extract-to-on-file.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/changelog.d/2026-07-13-repeatable-builder-config.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/changelog.d/2026-07-13-repeatable-cli-config.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/changelog.d/2026-07-13-sdk-default-baked-in-config.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/changelog.d/2026-07-13-subcommand-local-config-flags.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/changelog.d/2026-07-19-path-table-query-fallback.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/changelog.d/2026-07-19-path-table-vtab.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/changelog.d/2026-07-20-drop-implicit-files-table.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/changelog.d/2026-07-20-path-table-glob-semantics.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/changelog.d/2026-07-20-schema-inference.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/changelog.d/2026-07-21-remove-glob-captures.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/changelog.d/README.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/docs/explanation.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/docs/getting-started.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/docs/howto/columns-from-paths.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/docs/howto/define-tables.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/docs/howto/embed.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/docs/howto/extract-from-contents.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/docs/howto/load-extension.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/docs/howto/persist.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/docs/howto/query-without-config.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/docs/howto/react-to-changes.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/docs/howto/search-by-meaning.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/docs/howto/skip-files.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/docs/index.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/docs/migrations.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/docs/reference/columns.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/docs/reference/config.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/docs/reference/hooks.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/docs/reference/http-api.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/docs/reference/sdk.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/migrations.d/2026-07-13-drop-cwd-config-auto-detect.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/migrations.d/2026-07-13-fan-out-file-table-matching.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/migrations.d/2026-07-13-persist-wal.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/migrations.d/2026-07-13-rename-extract-to-on-file.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/migrations.d/2026-07-13-sdk-default-baked-in-config.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/migrations.d/2026-07-13-subcommand-local-config-flags.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/migrations.d/2026-07-20-drop-implicit-files-table.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/migrations.d/2026-07-20-path-table-glob-semantics.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/migrations.d/2026-07-21-remove-glob-captures.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/migrations.d/README.md +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/src/cli/execute.rs +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/src/cli/mod.rs +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/src/cli/router.rs +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/src/cli/serialize.rs +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/src/cli/server.rs +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/src/command.rs +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/src/config.rs +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/src/differ.rs +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/src/infer.rs +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/src/matcher.rs +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/src/path_table.rs +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/src/persist.rs +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/src/scanner.rs +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/src/vtab.rs +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/packages/rust/src/watcher.rs +0 -0
- {dirsql-0.3.118 → dirsql-0.3.120}/pyproject.toml +0 -0
|
@@ -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).
|
|
@@ -151,6 +151,25 @@ uses**, so behavior is identical to `POST /query` by construction:
|
|
|
151
151
|
statements; dirsql separately never modifies the files it indexes — see
|
|
152
152
|
[Read-only by design](../explanation#read-only-by-design).
|
|
153
153
|
|
|
154
|
+
#### `--on-file <command>`
|
|
155
|
+
|
|
156
|
+
Attach a parser to every [path-table](./path-tables.md#parsing-rows-with-on-file)
|
|
157
|
+
in the query, so each matched file yields the rows the command prints (a JSON
|
|
158
|
+
array of row objects) instead of the stat columns:
|
|
159
|
+
|
|
160
|
+
```sh
|
|
161
|
+
dirsql query "SELECT title, author FROM './posts/*.md'" \
|
|
162
|
+
--on-file 'extract.py {path}'
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
The command follows the [`on-file` hook contract](./hooks.md#on-file) — argv
|
|
166
|
+
splitting, `{path}`/`{root}` placeholders, per-file failure isolation, and the
|
|
167
|
+
timeout. The parser's output is the whole schema; the stat columns are not
|
|
168
|
+
reachable on a parsed path-table. `--on-file` may be given **at most once** (a
|
|
169
|
+
repeat is an error pointing at config files) and never touches config-declared
|
|
170
|
+
tables. It is a `query`-only flag — server mode rejects it as an unknown
|
|
171
|
+
argument.
|
|
172
|
+
|
|
154
173
|
Errors print the same diagnostic the HTTP `{"error": …}` body carries —
|
|
155
174
|
config failures, SQL errors, rejected reads, hook failures, timeouts — to
|
|
156
175
|
stderr, with exit code `1`.
|
|
@@ -164,8 +183,11 @@ stderr, with exit code `1`.
|
|
|
164
183
|
|
|
165
184
|
## `dirsql init`
|
|
166
185
|
|
|
167
|
-
Writes a starter `.dirsql.toml`
|
|
168
|
-
|
|
186
|
+
Writes a starter `.dirsql.toml` as a scaffold to edit. It does **not**
|
|
187
|
+
duplicate the zero-config floor (`SELECT * FROM './'` already lists every file
|
|
188
|
+
with no config); instead it shows the **escalation**: one named `[[table]]`
|
|
189
|
+
with a glob, a schema, and a real `on-file` hook that pulls structured rows
|
|
190
|
+
out of your files.
|
|
169
191
|
|
|
170
192
|
```bash
|
|
171
193
|
dirsql init
|
|
@@ -206,7 +228,7 @@ installed in the same environment as `dirsql` (`pip install …`, or
|
|
|
206
228
|
loads its fragment — its tables are queryable with zero config edits.
|
|
207
229
|
Installed = active: there is no enable step and no naming convention. The
|
|
208
230
|
fragment is composed *after* your own `-c` configs (so your config takes
|
|
209
|
-
precedence in ordering), and the shipped starter `
|
|
231
|
+
precedence in ordering), and the shipped starter `records` table is preserved.
|
|
210
232
|
|
|
211
233
|
Discovery is **launcher-only** — the standalone `cargo`-installed binary does no
|
|
212
234
|
discovery, and the SDKs never auto-discover (pass a plugin's config explicitly
|
|
@@ -114,6 +114,39 @@ SELECT path FROM './docs/*.md' WHERE content LIKE '%deprecated%';
|
|
|
114
114
|
A file that cannot be read, or is not valid UTF-8, yields `NULL` content rather
|
|
115
115
|
than failing the query.
|
|
116
116
|
|
|
117
|
+
## Parsing rows with `--on-file`
|
|
118
|
+
|
|
119
|
+
By default a path-table's columns are the stat columns above — one row per
|
|
120
|
+
file. When you want *one row per record inside* each file, attach a parser with
|
|
121
|
+
the `dirsql query` flag [`--on-file`](/reference/cli):
|
|
122
|
+
|
|
123
|
+
```sh
|
|
124
|
+
dirsql query "SELECT title, author FROM './posts/*.md'" \
|
|
125
|
+
--on-file 'extract.py {path}'
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
The command runs once per matched file and prints a JSON array of row objects,
|
|
129
|
+
exactly like a declared table's [`on-file` hook](/reference/hooks) — same argv
|
|
130
|
+
splitting, same `{path}`/`{root}` placeholders, same timeout. Its output *is*
|
|
131
|
+
the table:
|
|
132
|
+
|
|
133
|
+
- **The parser supplies the whole schema.** Columns are inferred from the keys
|
|
134
|
+
across the emitted rows. The stat columns (`path`, `size`, …) are **not**
|
|
135
|
+
reachable on a parsed path-table — a parser that wants the path emits it (it
|
|
136
|
+
has `{path}`). The two modes stay cleanly separate.
|
|
137
|
+
- **Failures are isolated per file.** A file whose parser fails (spawn, non-zero
|
|
138
|
+
exit, timeout, or no output) or whose output is not a JSON array of rows
|
|
139
|
+
contributes no rows; a one-line warning naming the file goes to stderr and the
|
|
140
|
+
scan continues. The schema is inferred from the files that did parse.
|
|
141
|
+
- **The skip rules still apply.** A parsed scan honors the same `node_modules`
|
|
142
|
+
/`.git`/`ignore` rules a stat scan does (see below).
|
|
143
|
+
|
|
144
|
+
`--on-file` applies to **every** path-table in the query and may be given **at
|
|
145
|
+
most once**. For different parsers per file set, define named tables in a
|
|
146
|
+
`.dirsql.toml` with their own `on-file` keys and pass it with `-c` — the flag
|
|
147
|
+
never touches config-declared tables. It is a `query`-subcommand flag; server
|
|
148
|
+
mode does not accept it.
|
|
149
|
+
|
|
117
150
|
## Freshness and scope
|
|
118
151
|
|
|
119
152
|
A path-table is scanned when the statement runs, so it always reflects the
|
|
@@ -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.120"
|
|
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
|
{dirsql-0.3.118/packages/rust → dirsql-0.3.120/packages/python}/docs/howto/write-a-plugin.md
RENAMED
|
@@ -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).
|
|
@@ -151,6 +151,25 @@ uses**, so behavior is identical to `POST /query` by construction:
|
|
|
151
151
|
statements; dirsql separately never modifies the files it indexes — see
|
|
152
152
|
[Read-only by design](../explanation#read-only-by-design).
|
|
153
153
|
|
|
154
|
+
#### `--on-file <command>`
|
|
155
|
+
|
|
156
|
+
Attach a parser to every [path-table](./path-tables.md#parsing-rows-with-on-file)
|
|
157
|
+
in the query, so each matched file yields the rows the command prints (a JSON
|
|
158
|
+
array of row objects) instead of the stat columns:
|
|
159
|
+
|
|
160
|
+
```sh
|
|
161
|
+
dirsql query "SELECT title, author FROM './posts/*.md'" \
|
|
162
|
+
--on-file 'extract.py {path}'
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
The command follows the [`on-file` hook contract](./hooks.md#on-file) — argv
|
|
166
|
+
splitting, `{path}`/`{root}` placeholders, per-file failure isolation, and the
|
|
167
|
+
timeout. The parser's output is the whole schema; the stat columns are not
|
|
168
|
+
reachable on a parsed path-table. `--on-file` may be given **at most once** (a
|
|
169
|
+
repeat is an error pointing at config files) and never touches config-declared
|
|
170
|
+
tables. It is a `query`-only flag — server mode rejects it as an unknown
|
|
171
|
+
argument.
|
|
172
|
+
|
|
154
173
|
Errors print the same diagnostic the HTTP `{"error": …}` body carries —
|
|
155
174
|
config failures, SQL errors, rejected reads, hook failures, timeouts — to
|
|
156
175
|
stderr, with exit code `1`.
|
|
@@ -164,8 +183,11 @@ stderr, with exit code `1`.
|
|
|
164
183
|
|
|
165
184
|
## `dirsql init`
|
|
166
185
|
|
|
167
|
-
Writes a starter `.dirsql.toml`
|
|
168
|
-
|
|
186
|
+
Writes a starter `.dirsql.toml` as a scaffold to edit. It does **not**
|
|
187
|
+
duplicate the zero-config floor (`SELECT * FROM './'` already lists every file
|
|
188
|
+
with no config); instead it shows the **escalation**: one named `[[table]]`
|
|
189
|
+
with a glob, a schema, and a real `on-file` hook that pulls structured rows
|
|
190
|
+
out of your files.
|
|
169
191
|
|
|
170
192
|
```bash
|
|
171
193
|
dirsql init
|
|
@@ -206,7 +228,7 @@ installed in the same environment as `dirsql` (`pip install …`, or
|
|
|
206
228
|
loads its fragment — its tables are queryable with zero config edits.
|
|
207
229
|
Installed = active: there is no enable step and no naming convention. The
|
|
208
230
|
fragment is composed *after* your own `-c` configs (so your config takes
|
|
209
|
-
precedence in ordering), and the shipped starter `
|
|
231
|
+
precedence in ordering), and the shipped starter `records` table is preserved.
|
|
210
232
|
|
|
211
233
|
Discovery is **launcher-only** — the standalone `cargo`-installed binary does no
|
|
212
234
|
discovery, and the SDKs never auto-discover (pass a plugin's config explicitly
|
|
@@ -114,6 +114,39 @@ SELECT path FROM './docs/*.md' WHERE content LIKE '%deprecated%';
|
|
|
114
114
|
A file that cannot be read, or is not valid UTF-8, yields `NULL` content rather
|
|
115
115
|
than failing the query.
|
|
116
116
|
|
|
117
|
+
## Parsing rows with `--on-file`
|
|
118
|
+
|
|
119
|
+
By default a path-table's columns are the stat columns above — one row per
|
|
120
|
+
file. When you want *one row per record inside* each file, attach a parser with
|
|
121
|
+
the `dirsql query` flag [`--on-file`](/reference/cli):
|
|
122
|
+
|
|
123
|
+
```sh
|
|
124
|
+
dirsql query "SELECT title, author FROM './posts/*.md'" \
|
|
125
|
+
--on-file 'extract.py {path}'
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
The command runs once per matched file and prints a JSON array of row objects,
|
|
129
|
+
exactly like a declared table's [`on-file` hook](/reference/hooks) — same argv
|
|
130
|
+
splitting, same `{path}`/`{root}` placeholders, same timeout. Its output *is*
|
|
131
|
+
the table:
|
|
132
|
+
|
|
133
|
+
- **The parser supplies the whole schema.** Columns are inferred from the keys
|
|
134
|
+
across the emitted rows. The stat columns (`path`, `size`, …) are **not**
|
|
135
|
+
reachable on a parsed path-table — a parser that wants the path emits it (it
|
|
136
|
+
has `{path}`). The two modes stay cleanly separate.
|
|
137
|
+
- **Failures are isolated per file.** A file whose parser fails (spawn, non-zero
|
|
138
|
+
exit, timeout, or no output) or whose output is not a JSON array of rows
|
|
139
|
+
contributes no rows; a one-line warning naming the file goes to stderr and the
|
|
140
|
+
scan continues. The schema is inferred from the files that did parse.
|
|
141
|
+
- **The skip rules still apply.** A parsed scan honors the same `node_modules`
|
|
142
|
+
/`.git`/`ignore` rules a stat scan does (see below).
|
|
143
|
+
|
|
144
|
+
`--on-file` applies to **every** path-table in the query and may be given **at
|
|
145
|
+
most once**. For different parsers per file set, define named tables in a
|
|
146
|
+
`.dirsql.toml` with their own `on-file` keys and pass it with `-c` — the flag
|
|
147
|
+
never touches config-declared tables. It is a `query`-subcommand flag; server
|
|
148
|
+
mode does not accept it.
|
|
149
|
+
|
|
117
150
|
## Freshness and scope
|
|
118
151
|
|
|
119
152
|
A path-table is scanned when the statement runs, so it always reflects the
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
**Added**
|
|
2
|
+
|
|
3
|
+
`dirsql query "<sql>" --on-file '<command>'` attaches a parser to every
|
|
4
|
+
[path-table](https://thekevinscott.github.io/dirsql/reference/path-tables) in
|
|
5
|
+
the query. With the flag set, a path-table's rows and schema come from the
|
|
6
|
+
command's JSON output (the `on-file` hook contract — argv splitting,
|
|
7
|
+
`{path}`/`{root}` placeholders, timeout) instead of the stat columns. The
|
|
8
|
+
parser's output is the whole schema; stat columns are not reachable on a parsed
|
|
9
|
+
path-table. Failures are isolated per file — a file whose parser fails or whose
|
|
10
|
+
output does not parse contributes no rows and a stderr warning, and the scan
|
|
11
|
+
continues. Parsed scans honor the same `node_modules`/`.git`/`ignore` skip
|
|
12
|
+
rules stat scans do. The flag may be given at most once (a repeat errors,
|
|
13
|
+
pointing at config files), applies only to path-tables (config `[[table]]`
|
|
14
|
+
`on-file` hooks are untouched), and is `query`-only (server mode rejects it).
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
**Changed** — `dirsql init` now scaffolds an *escalation* example instead of a
|
|
2
|
+
catch-all `files` table. Because any path (`./`, `../`, `/`, `~/`) is already a
|
|
3
|
+
zero-config live view of the filesystem (`SELECT * FROM './'`), duplicating
|
|
4
|
+
that as a starter table taught nothing. The generated `.dirsql.toml` is now a
|
|
5
|
+
single named `[[table]]` (`records`) with a scoped `glob`, a pinned DDL, and a
|
|
6
|
+
real `on-file = "cat {path}"` hook that turns each matched `*.json` file into
|
|
7
|
+
rows — with a commented custom-parser stub and a header comment pointing at the
|
|
8
|
+
zero-config floor. The scaffold works as written: `dirsql init` then
|
|
9
|
+
`dirsql query "SELECT * FROM records" -c .dirsql.toml` returns the parsed rows.
|
|
10
|
+
The `--include-default` launcher path seeds this same table.
|
{dirsql-0.3.118/packages/python → dirsql-0.3.120/packages/rust}/docs/howto/write-a-plugin.md
RENAMED
|
@@ -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).
|
|
@@ -151,6 +151,25 @@ uses**, so behavior is identical to `POST /query` by construction:
|
|
|
151
151
|
statements; dirsql separately never modifies the files it indexes — see
|
|
152
152
|
[Read-only by design](../explanation#read-only-by-design).
|
|
153
153
|
|
|
154
|
+
#### `--on-file <command>`
|
|
155
|
+
|
|
156
|
+
Attach a parser to every [path-table](./path-tables.md#parsing-rows-with-on-file)
|
|
157
|
+
in the query, so each matched file yields the rows the command prints (a JSON
|
|
158
|
+
array of row objects) instead of the stat columns:
|
|
159
|
+
|
|
160
|
+
```sh
|
|
161
|
+
dirsql query "SELECT title, author FROM './posts/*.md'" \
|
|
162
|
+
--on-file 'extract.py {path}'
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
The command follows the [`on-file` hook contract](./hooks.md#on-file) — argv
|
|
166
|
+
splitting, `{path}`/`{root}` placeholders, per-file failure isolation, and the
|
|
167
|
+
timeout. The parser's output is the whole schema; the stat columns are not
|
|
168
|
+
reachable on a parsed path-table. `--on-file` may be given **at most once** (a
|
|
169
|
+
repeat is an error pointing at config files) and never touches config-declared
|
|
170
|
+
tables. It is a `query`-only flag — server mode rejects it as an unknown
|
|
171
|
+
argument.
|
|
172
|
+
|
|
154
173
|
Errors print the same diagnostic the HTTP `{"error": …}` body carries —
|
|
155
174
|
config failures, SQL errors, rejected reads, hook failures, timeouts — to
|
|
156
175
|
stderr, with exit code `1`.
|
|
@@ -164,8 +183,11 @@ stderr, with exit code `1`.
|
|
|
164
183
|
|
|
165
184
|
## `dirsql init`
|
|
166
185
|
|
|
167
|
-
Writes a starter `.dirsql.toml`
|
|
168
|
-
|
|
186
|
+
Writes a starter `.dirsql.toml` as a scaffold to edit. It does **not**
|
|
187
|
+
duplicate the zero-config floor (`SELECT * FROM './'` already lists every file
|
|
188
|
+
with no config); instead it shows the **escalation**: one named `[[table]]`
|
|
189
|
+
with a glob, a schema, and a real `on-file` hook that pulls structured rows
|
|
190
|
+
out of your files.
|
|
169
191
|
|
|
170
192
|
```bash
|
|
171
193
|
dirsql init
|
|
@@ -206,7 +228,7 @@ installed in the same environment as `dirsql` (`pip install …`, or
|
|
|
206
228
|
loads its fragment — its tables are queryable with zero config edits.
|
|
207
229
|
Installed = active: there is no enable step and no naming convention. The
|
|
208
230
|
fragment is composed *after* your own `-c` configs (so your config takes
|
|
209
|
-
precedence in ordering), and the shipped starter `
|
|
231
|
+
precedence in ordering), and the shipped starter `records` table is preserved.
|
|
210
232
|
|
|
211
233
|
Discovery is **launcher-only** — the standalone `cargo`-installed binary does no
|
|
212
234
|
discovery, and the SDKs never auto-discover (pass a plugin's config explicitly
|
|
@@ -114,6 +114,39 @@ SELECT path FROM './docs/*.md' WHERE content LIKE '%deprecated%';
|
|
|
114
114
|
A file that cannot be read, or is not valid UTF-8, yields `NULL` content rather
|
|
115
115
|
than failing the query.
|
|
116
116
|
|
|
117
|
+
## Parsing rows with `--on-file`
|
|
118
|
+
|
|
119
|
+
By default a path-table's columns are the stat columns above — one row per
|
|
120
|
+
file. When you want *one row per record inside* each file, attach a parser with
|
|
121
|
+
the `dirsql query` flag [`--on-file`](/reference/cli):
|
|
122
|
+
|
|
123
|
+
```sh
|
|
124
|
+
dirsql query "SELECT title, author FROM './posts/*.md'" \
|
|
125
|
+
--on-file 'extract.py {path}'
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
The command runs once per matched file and prints a JSON array of row objects,
|
|
129
|
+
exactly like a declared table's [`on-file` hook](/reference/hooks) — same argv
|
|
130
|
+
splitting, same `{path}`/`{root}` placeholders, same timeout. Its output *is*
|
|
131
|
+
the table:
|
|
132
|
+
|
|
133
|
+
- **The parser supplies the whole schema.** Columns are inferred from the keys
|
|
134
|
+
across the emitted rows. The stat columns (`path`, `size`, …) are **not**
|
|
135
|
+
reachable on a parsed path-table — a parser that wants the path emits it (it
|
|
136
|
+
has `{path}`). The two modes stay cleanly separate.
|
|
137
|
+
- **Failures are isolated per file.** A file whose parser fails (spawn, non-zero
|
|
138
|
+
exit, timeout, or no output) or whose output is not a JSON array of rows
|
|
139
|
+
contributes no rows; a one-line warning naming the file goes to stderr and the
|
|
140
|
+
scan continues. The schema is inferred from the files that did parse.
|
|
141
|
+
- **The skip rules still apply.** A parsed scan honors the same `node_modules`
|
|
142
|
+
/`.git`/`ignore` rules a stat scan does (see below).
|
|
143
|
+
|
|
144
|
+
`--on-file` applies to **every** path-table in the query and may be given **at
|
|
145
|
+
most once**. For different parsers per file set, define named tables in a
|
|
146
|
+
`.dirsql.toml` with their own `on-file` keys and pass it with `-c` — the flag
|
|
147
|
+
never touches config-declared tables. It is a `query`-subcommand flag; server
|
|
148
|
+
mode does not accept it.
|
|
149
|
+
|
|
117
150
|
## Freshness and scope
|
|
118
151
|
|
|
119
152
|
A path-table is scanned when the statement runs, so it always reflects the
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
### `dirsql init` output rewritten as an escalation example (#637)
|
|
2
|
+
|
|
3
|
+
#### Summary
|
|
4
|
+
|
|
5
|
+
`dirsql init` no longer writes a catch-all `files` table over `**/*` with a
|
|
6
|
+
stat-column schema. That table only duplicated the zero-config path-table floor
|
|
7
|
+
(`SELECT * FROM './'`), which already lists every file with `path`, `basename`,
|
|
8
|
+
`dir`, `ext`, `size`, `mtime` and `ctime` and no config at all. The generated
|
|
9
|
+
`.dirsql.toml` is now an **escalation** scaffold: one named `[[table]]`
|
|
10
|
+
(`records`) with a scoped `glob = "**/*.json"`, a pinned
|
|
11
|
+
`ddl = "CREATE TABLE records (id TEXT, name TEXT)"`, and a real
|
|
12
|
+
`on-file = "cat {path}"` hook whose rows come entirely from the hook (dirsql
|
|
13
|
+
injects no columns). The internal `--include-default` launcher path seeds this
|
|
14
|
+
same table's glob and DDL.
|
|
15
|
+
|
|
16
|
+
The public `init` contract is otherwise unchanged: `--root`, `--output`,
|
|
17
|
+
`--force`, the no-auto-load behavior, and every exit-code / error arm are the
|
|
18
|
+
same. Only the *bytes written* changed.
|
|
19
|
+
|
|
20
|
+
Carrying a genuine `on-file` hook keeps the shipped asset a valid config both
|
|
21
|
+
today and once hook-less `[[table]]` entries become a load error, so
|
|
22
|
+
`--include-default` (which parses the asset with `.expect(...)`) never panics.
|
|
23
|
+
|
|
24
|
+
#### Required changes
|
|
25
|
+
|
|
26
|
+
| Surface | Before | After |
|
|
27
|
+
| ------- | ------ | ----- |
|
|
28
|
+
| Query the init scaffold | `dirsql query "SELECT * FROM files" -c .dirsql.toml` | `dirsql query "SELECT * FROM records" -c .dirsql.toml` |
|
|
29
|
+
| Want the old `files` table | (what `init` emitted) | write it yourself (snippet below) and pass with `-c` |
|
|
30
|
+
|
|
31
|
+
To restore the previous starter table verbatim, write this `.dirsql.toml` and
|
|
32
|
+
pass it explicitly:
|
|
33
|
+
|
|
34
|
+
```toml
|
|
35
|
+
[[table]]
|
|
36
|
+
ddl = "CREATE TABLE files (path TEXT, basename TEXT, dir TEXT, ext TEXT, size INTEGER, mtime INTEGER, ctime INTEGER)"
|
|
37
|
+
glob = "**/*"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Note: this hook-less form loads today but is on track to become a config error;
|
|
41
|
+
prefer the zero-config `SELECT * FROM './'` for filesystem listings.
|
|
42
|
+
|
|
43
|
+
#### Deprecations removed
|
|
44
|
+
|
|
45
|
+
_None._
|
|
46
|
+
|
|
47
|
+
#### Behavior changes without code changes
|
|
48
|
+
|
|
49
|
+
- `dirsql init` writes different bytes: a `records` escalation example rather
|
|
50
|
+
than a `files` catch-all table. No flags or exit codes changed.
|
|
51
|
+
- `--include-default` now seeds a `records` table (glob `**/*.json`) instead of
|
|
52
|
+
a `files` table (glob `**/*`).
|
|
53
|
+
|
|
54
|
+
#### Verification
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
cd "$(mktemp -d)"
|
|
58
|
+
printf '[{"id":"1","name":"widget"}]' > things.json
|
|
59
|
+
dirsql init
|
|
60
|
+
dirsql query "SELECT id, name FROM records" -c .dirsql.toml
|
|
61
|
+
# [{"id":"1","name":"widget"}]
|
|
62
|
+
dirsql query "SELECT basename FROM './'" # the zero-config floor still needs no config
|
|
63
|
+
# [{"basename":".dirsql.toml"},{"basename":"things.json"}]
|
|
64
|
+
```
|