dirsql 0.4.26__tar.gz → 0.4.27__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.4.26 → dirsql-0.4.27}/Cargo.lock +1 -1
- {dirsql-0.4.26 → dirsql-0.4.27}/PKG-INFO +1 -1
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/Cargo.toml +1 -1
- dirsql-0.4.27/packages/python/e2e-attestations/claude-issue-986-red-test-e7sjrb.json +7 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/src/lib.rs +128 -3
- {dirsql-0.4.26 → dirsql-0.4.27}/Cargo.toml +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/README.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/dirsql/__init__.py +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/dirsql/_async.py +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/dirsql/_dirsql.pyi +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/dirsql/cli/__init__.py +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/dirsql/cli/discover_plugins/__init__.py +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/dirsql/cli/discover_plugins/discovered_fragments.py +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/dirsql/cli/discover_plugins/discovery_disabled.py +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/dirsql/cli/discover_plugins/fragment_path.py +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/dirsql/cli/discover_plugins/user_passed_config.py +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/dirsql/cli/discover_plugins/with_discovered_plugins.py +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/dirsql/cli/main.py +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/dirsql/cli/resolve_config_extensions.py +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/dirsql/py.typed +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/dirsql/resolve_config_extensions.py +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/dirsql/resolve_extension.py +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/.claude/CLAUDE.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/.vitepress/config.ts +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/.vitepress/theme/index.ts +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/.vitepress/theme/lang.ts +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/AGENTS.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/explanation.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/getting-started.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/howto/columns-from-paths.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/howto/define-tables.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/howto/embed.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/howto/extract-from-contents.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/howto/load-extension.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/howto/parse-files-into-columns.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/howto/persist.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/howto/query-json.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/howto/query-without-config.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/howto/react-to-changes.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/howto/search-by-meaning.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/howto/skip-files.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/howto/write-a-plugin.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/index.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/package.json +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/plugins.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/pnpm-lock.yaml +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/pnpm-workspace.yaml +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/reference/cli.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/reference/columns.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/reference/config.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/reference/hooks.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/reference/http-api.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/reference/path-tables.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/docs/reference/sdk.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/CHANGELOG.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/MIGRATIONS.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/README.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/changelog.d/2026-07-13-drop-cwd-config-auto-detect.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/changelog.d/2026-07-13-plugin-discovery.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/changelog.d/2026-07-13-rename-extract-to-on-file.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/changelog.d/2026-07-13-repeatable-config.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/changelog.d/2026-07-13-sdk-default-baked-in-config.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/changelog.d/2026-07-20-drop-implicit-files-table.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/changelog.d/2026-07-21-remove-glob-captures.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/changelog.d/2026-07-24-hookless-table-config-error.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/changelog.d/2026-07-24-remove-stat-fact-injection.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/changelog.d/2026-07-29-restore-python-310.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/changelog.d/2026-08-02-release-profile.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/changelog.d/2026-08-02-scan-failures.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/changelog.d/2026-08-03-discovery-ext-resolution.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/changelog.d/2026-08-03-manylinux-dynamic-binary.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/changelog.d/2026-08-03-python-no-ignore.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/changelog.d/2026-08-04-cast-lints.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/changelog.d/2026-08-04-cli-in-process.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/changelog.d/2026-08-20-declared-table-name.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/changelog.d/README.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/conftest.py +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/.claude/CLAUDE.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/.vitepress/config.ts +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/.vitepress/theme/index.ts +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/.vitepress/theme/lang.ts +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/AGENTS.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/explanation.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/getting-started.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/howto/columns-from-paths.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/howto/define-tables.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/howto/embed.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/howto/extract-from-contents.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/howto/load-extension.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/howto/parse-files-into-columns.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/howto/persist.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/howto/query-json.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/howto/query-without-config.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/howto/react-to-changes.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/howto/search-by-meaning.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/howto/skip-files.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/howto/write-a-plugin.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/index.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/package.json +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/plugins.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/pnpm-lock.yaml +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/pnpm-workspace.yaml +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/reference/cli.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/reference/columns.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/reference/config.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/reference/hooks.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/reference/http-api.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/reference/path-tables.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/docs/reference/sdk.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/e2e-attestations/claude-819-oneshot-timeout.json +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/e2e-attestations/claude-827-unquote-doubled-quotes.json +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/e2e-attestations/claude-github-issue-825-e4mhhp.json +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/e2e-attestations/claude-issue-951-0eease.json +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/e2e-attestations/claude-issue-962-0jjrfv.json +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/migrations.d/2026-07-13-drop-cwd-config-auto-detect.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/migrations.d/2026-07-13-rename-extract-to-on-file.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/migrations.d/2026-07-13-sdk-default-baked-in-config.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/migrations.d/2026-07-20-drop-implicit-files-table.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/migrations.d/2026-07-21-remove-glob-captures.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/migrations.d/2026-07-24-hookless-table-config-error.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/migrations.d/2026-07-24-remove-stat-fact-injection.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/migrations.d/2026-07-29-restore-python-310.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/migrations.d/2026-08-04-cli-in-process.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/migrations.d/2026-08-20-declared-table-name.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/migrations.d/README.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/src/lib.rs +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/testing-conventions.toml +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/tests/__init__.py +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/tests/conftest.py +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/tests/e2e/__init__.py +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/tests/e2e/fixtures/dirsql_plugin_fixture/__init__.py +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/tests/e2e/fixtures/dirsql_plugin_fixture/dirsql.toml +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/tests/integration/__init__.py +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/tests/integration/binding/__init__.py +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/python/tests/integration/hermetic/__init__.py +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/CHANGELOG.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/Cargo.toml +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/MIGRATIONS.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/README.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/benches/db_bench.rs +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/benches/differ_bench.rs +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/benches/matcher_bench.rs +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/benches/scanner_bench.rs +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/docs/explanation.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/docs/getting-started.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/docs/howto/columns-from-paths.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/docs/howto/define-tables.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/docs/howto/embed.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/docs/howto/extract-from-contents.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/docs/howto/load-extension.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/docs/howto/parse-files-into-columns.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/docs/howto/persist.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/docs/howto/query-json.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/docs/howto/query-without-config.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/docs/howto/react-to-changes.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/docs/howto/search-by-meaning.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/docs/howto/skip-files.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/docs/howto/write-a-plugin.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/docs/index.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/docs/plugins.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/docs/reference/cli.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/docs/reference/columns.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/docs/reference/config.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/docs/reference/hooks.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/docs/reference/http-api.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/docs/reference/path-tables.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/docs/reference/sdk.md +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/src/bin/dirsql.rs +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/src/cli/execute.rs +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/src/cli/init.rs +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/src/cli/mod.rs +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/src/cli/router.rs +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/src/cli/run.rs +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/src/cli/serialize.rs +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/src/cli/server.rs +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/src/command.rs +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/src/config.rs +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/src/db.rs +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/src/default_config.toml +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/src/differ.rs +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/src/functions.rs +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/src/infer.rs +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/src/matcher.rs +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/src/parsed_cache.rs +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/src/parsed_vtab.rs +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/src/path_table.rs +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/src/persist.rs +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/src/scanner.rs +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/src/sql_literal.rs +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/src/vtab.rs +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/packages/rust/src/watcher.rs +0 -0
- {dirsql-0.4.26 → dirsql-0.4.27}/pyproject.toml +0 -0
|
@@ -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.4.
|
|
7
|
+
version = "0.4.27"
|
|
8
8
|
# abi3 note: the `abi3-py310` pyo3 feature (below) builds ONE stable-ABI
|
|
9
9
|
# `cp310-abi3` wheel per platform that loads on every CPython >= 3.10
|
|
10
10
|
# (matching `pyproject.toml`'s `requires-python = ">=3.10"`), instead of
|
|
@@ -310,6 +310,12 @@ pub struct DirSQL {
|
|
|
310
310
|
inner: Arc<DirSqlInner>,
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
+
/// Internal scan seam: the startup directory walk, injectable so unit tests
|
|
314
|
+
/// can observe whether it ran. The walk has no result a caller can tell apart
|
|
315
|
+
/// from not walking, so *whether* it ran takes a seam. Production always
|
|
316
|
+
/// passes [`scan_directory`].
|
|
317
|
+
type ScanFn<'a> = &'a dyn Fn(&Path, &TableMatcher) -> Vec<(PathBuf, String)>;
|
|
318
|
+
|
|
313
319
|
impl DirSQL {
|
|
314
320
|
/// Start building a `DirSQL`. See [`DirSQLBuilder`] for the available
|
|
315
321
|
/// configuration methods. Call `.build()` to finish construction
|
|
@@ -690,6 +696,10 @@ impl DirSQL {
|
|
|
690
696
|
/// JS main thread for the napi-rs TypeScript binding).
|
|
691
697
|
#[doc(hidden)]
|
|
692
698
|
pub fn prepare_resolved(resolved: ResolvedBuild) -> Result<PreparedBuild> {
|
|
699
|
+
Self::prepare_resolved_with(resolved, &scan_directory)
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
fn prepare_resolved_with(resolved: ResolvedBuild, scan: ScanFn<'_>) -> Result<PreparedBuild> {
|
|
693
703
|
let ResolvedBuild {
|
|
694
704
|
root,
|
|
695
705
|
tables,
|
|
@@ -719,7 +729,15 @@ impl DirSQL {
|
|
|
719
729
|
None
|
|
720
730
|
};
|
|
721
731
|
|
|
722
|
-
|
|
732
|
+
// Zero tables means an empty `TableMatcher`, and `match_all` filters
|
|
733
|
+
// its entries -- so the walk is guaranteed to return nothing. That is
|
|
734
|
+
// the configless case (path-tables run their own per-statement scan),
|
|
735
|
+
// where the walk was the bulk of startup.
|
|
736
|
+
let scanned = if table_names.is_empty() {
|
|
737
|
+
Vec::new()
|
|
738
|
+
} else {
|
|
739
|
+
scan(&root, &matcher)
|
|
740
|
+
};
|
|
723
741
|
|
|
724
742
|
// When persist is enabled, files whose stat tuple matches the cache
|
|
725
743
|
// (and that pass the racy-window check) are trusted instead of
|
|
@@ -739,8 +757,6 @@ impl DirSQL {
|
|
|
739
757
|
Some(ctx) => reconcile_scan(&root, scanned, ctx, &RealFs)?,
|
|
740
758
|
};
|
|
741
759
|
|
|
742
|
-
let _ = table_names;
|
|
743
|
-
|
|
744
760
|
Ok(PreparedBuild {
|
|
745
761
|
root,
|
|
746
762
|
tables,
|
|
@@ -2076,6 +2092,7 @@ mod readonly_tests {
|
|
|
2076
2092
|
#[cfg(test)]
|
|
2077
2093
|
mod internal_tests {
|
|
2078
2094
|
use super::*;
|
|
2095
|
+
use std::cell::Cell;
|
|
2079
2096
|
use std::collections::HashMap as StdHashMap;
|
|
2080
2097
|
use std::collections::HashSet as StdHashSet;
|
|
2081
2098
|
use tempfile::TempDir;
|
|
@@ -2154,6 +2171,114 @@ mod internal_tests {
|
|
|
2154
2171
|
}
|
|
2155
2172
|
}
|
|
2156
2173
|
|
|
2174
|
+
/// Records how many times the startup walk ran and hands back a canned
|
|
2175
|
+
/// result, so the assertion is about the walk happening, not about any
|
|
2176
|
+
/// tree on disk.
|
|
2177
|
+
struct RecordingScan {
|
|
2178
|
+
calls: Cell<usize>,
|
|
2179
|
+
found: Vec<(PathBuf, String)>,
|
|
2180
|
+
}
|
|
2181
|
+
|
|
2182
|
+
impl RecordingScan {
|
|
2183
|
+
fn new(found: Vec<(PathBuf, String)>) -> Self {
|
|
2184
|
+
Self {
|
|
2185
|
+
calls: Cell::new(0),
|
|
2186
|
+
found,
|
|
2187
|
+
}
|
|
2188
|
+
}
|
|
2189
|
+
|
|
2190
|
+
fn scan(&self, _root: &Path, _matcher: &TableMatcher) -> Vec<(PathBuf, String)> {
|
|
2191
|
+
self.calls.set(self.calls.get() + 1);
|
|
2192
|
+
self.found.clone()
|
|
2193
|
+
}
|
|
2194
|
+
}
|
|
2195
|
+
|
|
2196
|
+
fn resolved_over(root: &Path, tables: Vec<Table>, persist: bool) -> ResolvedBuild {
|
|
2197
|
+
ResolvedBuild {
|
|
2198
|
+
root: root.to_path_buf(),
|
|
2199
|
+
tables,
|
|
2200
|
+
ignore: Vec::new(),
|
|
2201
|
+
extensions: Vec::new(),
|
|
2202
|
+
functions: Vec::new(),
|
|
2203
|
+
persist,
|
|
2204
|
+
persist_path: None,
|
|
2205
|
+
poll_interval: DEFAULT_POLL_INTERVAL,
|
|
2206
|
+
hint_legacy_files_table: false,
|
|
2207
|
+
path_table_parser: None,
|
|
2208
|
+
no_ignore: false,
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
|
|
2212
|
+
fn txt_table() -> Table {
|
|
2213
|
+
Table::new(
|
|
2214
|
+
"items",
|
|
2215
|
+
"CREATE TABLE items (name TEXT)",
|
|
2216
|
+
"**/*.txt",
|
|
2217
|
+
|_| Vec::new(),
|
|
2218
|
+
)
|
|
2219
|
+
}
|
|
2220
|
+
|
|
2221
|
+
/// Configless startup declares zero tables, so nothing the walk could
|
|
2222
|
+
/// visit can match: the walk must not run at all.
|
|
2223
|
+
#[test]
|
|
2224
|
+
fn prepare_does_not_walk_the_tree_when_no_tables_are_declared() {
|
|
2225
|
+
let dir = TempDir::new().unwrap();
|
|
2226
|
+
let scan = RecordingScan::new(vec![(dir.path().join("a.txt"), "items".into())]);
|
|
2227
|
+
|
|
2228
|
+
let prepared = DirSQL::prepare_resolved_with(
|
|
2229
|
+
resolved_over(dir.path(), Vec::new(), false),
|
|
2230
|
+
&|root, matcher| scan.scan(root, matcher),
|
|
2231
|
+
)
|
|
2232
|
+
.unwrap();
|
|
2233
|
+
|
|
2234
|
+
assert_eq!(
|
|
2235
|
+
scan.calls.get(),
|
|
2236
|
+
0,
|
|
2237
|
+
"zero tables can match nothing, so the startup walk is pure waste"
|
|
2238
|
+
);
|
|
2239
|
+
assert!(prepared.scanned_files.is_empty());
|
|
2240
|
+
}
|
|
2241
|
+
|
|
2242
|
+
/// The skip is narrow: one declared table still walks, and prepare still
|
|
2243
|
+
/// carries what the walk found.
|
|
2244
|
+
#[test]
|
|
2245
|
+
fn prepare_walks_the_tree_when_a_table_is_declared() {
|
|
2246
|
+
let dir = TempDir::new().unwrap();
|
|
2247
|
+
let scan = RecordingScan::new(vec![(dir.path().join("a.txt"), "items".into())]);
|
|
2248
|
+
|
|
2249
|
+
let prepared = DirSQL::prepare_resolved_with(
|
|
2250
|
+
resolved_over(dir.path(), vec![txt_table()], false),
|
|
2251
|
+
&|root, matcher| scan.scan(root, matcher),
|
|
2252
|
+
)
|
|
2253
|
+
.unwrap();
|
|
2254
|
+
|
|
2255
|
+
assert_eq!(scan.calls.get(), 1);
|
|
2256
|
+
let found: Vec<&str> = prepared
|
|
2257
|
+
.scanned_files
|
|
2258
|
+
.iter()
|
|
2259
|
+
.map(|f| f.rel_path.as_str())
|
|
2260
|
+
.collect();
|
|
2261
|
+
assert_eq!(found, vec!["a.txt"]);
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
/// Skipping the walk skips only the walk: with persist on, the cache is
|
|
2265
|
+
/// still opened and reconciled against the (empty) scan.
|
|
2266
|
+
#[test]
|
|
2267
|
+
fn prepare_still_opens_the_persist_cache_when_no_tables_are_declared() {
|
|
2268
|
+
let dir = TempDir::new().unwrap();
|
|
2269
|
+
let scan = RecordingScan::new(Vec::new());
|
|
2270
|
+
|
|
2271
|
+
let prepared = DirSQL::prepare_resolved_with(
|
|
2272
|
+
resolved_over(dir.path(), Vec::new(), true),
|
|
2273
|
+
&|root, matcher| scan.scan(root, matcher),
|
|
2274
|
+
)
|
|
2275
|
+
.unwrap();
|
|
2276
|
+
|
|
2277
|
+
assert_eq!(scan.calls.get(), 0);
|
|
2278
|
+
let persist = prepared.persist.expect("persist context");
|
|
2279
|
+
assert!(persist.deleted.is_empty());
|
|
2280
|
+
}
|
|
2281
|
+
|
|
2157
2282
|
/// A canned [`FileStat`] for tests that only need a stat to succeed.
|
|
2158
2283
|
fn fake_stat() -> FileStat {
|
|
2159
2284
|
FileStat {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dirsql-0.4.26 → dirsql-0.4.27}/packages/python/changelog.d/2026-07-13-rename-extract-to-on-file.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dirsql-0.4.26 → dirsql-0.4.27}/packages/python/changelog.d/2026-07-20-drop-implicit-files-table.md
RENAMED
|
File without changes
|
{dirsql-0.4.26 → dirsql-0.4.27}/packages/python/changelog.d/2026-07-21-remove-glob-captures.md
RENAMED
|
File without changes
|
|
File without changes
|
{dirsql-0.4.26 → dirsql-0.4.27}/packages/python/changelog.d/2026-07-24-remove-stat-fact-injection.md
RENAMED
|
File without changes
|
{dirsql-0.4.26 → dirsql-0.4.27}/packages/python/changelog.d/2026-07-29-restore-python-310.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dirsql-0.4.26 → dirsql-0.4.27}/packages/python/changelog.d/2026-08-03-discovery-ext-resolution.md
RENAMED
|
File without changes
|
{dirsql-0.4.26 → dirsql-0.4.27}/packages/python/changelog.d/2026-08-03-manylinux-dynamic-binary.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dirsql-0.4.26 → dirsql-0.4.27}/packages/python/changelog.d/2026-08-20-declared-table-name.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dirsql-0.4.26 → dirsql-0.4.27}/packages/python/e2e-attestations/claude-819-oneshot-timeout.json
RENAMED
|
File without changes
|
|
File without changes
|
{dirsql-0.4.26 → dirsql-0.4.27}/packages/python/e2e-attestations/claude-github-issue-825-e4mhhp.json
RENAMED
|
File without changes
|
{dirsql-0.4.26 → dirsql-0.4.27}/packages/python/e2e-attestations/claude-issue-951-0eease.json
RENAMED
|
File without changes
|
{dirsql-0.4.26 → dirsql-0.4.27}/packages/python/e2e-attestations/claude-issue-962-0jjrfv.json
RENAMED
|
File without changes
|
|
File without changes
|
{dirsql-0.4.26 → dirsql-0.4.27}/packages/python/migrations.d/2026-07-13-rename-extract-to-on-file.md
RENAMED
|
File without changes
|
|
File without changes
|
{dirsql-0.4.26 → dirsql-0.4.27}/packages/python/migrations.d/2026-07-20-drop-implicit-files-table.md
RENAMED
|
File without changes
|
{dirsql-0.4.26 → dirsql-0.4.27}/packages/python/migrations.d/2026-07-21-remove-glob-captures.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dirsql-0.4.26 → dirsql-0.4.27}/packages/python/migrations.d/2026-07-29-restore-python-310.md
RENAMED
|
File without changes
|
|
File without changes
|
{dirsql-0.4.26 → dirsql-0.4.27}/packages/python/migrations.d/2026-08-20-declared-table-name.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dirsql-0.4.26 → dirsql-0.4.27}/packages/python/tests/e2e/fixtures/dirsql_plugin_fixture/__init__.py
RENAMED
|
File without changes
|
{dirsql-0.4.26 → dirsql-0.4.27}/packages/python/tests/e2e/fixtures/dirsql_plugin_fixture/dirsql.toml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|