dirsql 0.4.53__tar.gz → 0.4.55__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.53 → dirsql-0.4.55}/Cargo.lock +3 -2
- {dirsql-0.4.53 → dirsql-0.4.55}/Cargo.toml +3 -1
- {dirsql-0.4.53 → dirsql-0.4.55}/PKG-INFO +1 -1
- {dirsql-0.4.53 → dirsql-0.4.55}/dirsql/cli/main.py +15 -21
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/Cargo.toml +1 -1
- dirsql-0.4.55/packages/python/changelog.d/2026-09-20-sigint-ends-a-run-in-progress.md +1 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/README.md +1 -1
- dirsql-0.4.55/packages/python/e2e-attestations/claude-1164-sigint-fatal.json +7 -0
- dirsql-0.4.55/packages/python/e2e-attestations/claude-1170-projection-order.json +7 -0
- dirsql-0.4.55/packages/python/migrations.d/2026-09-20-sigint-ends-a-run-in-progress.md +35 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/migrations.d/README.md +2 -2
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/Cargo.toml +1 -1
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/cli/execute.rs +7 -3
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/cli/serialize.rs +48 -3
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/cli/table.rs +31 -6
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/db.rs +53 -1
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/lib.rs +9 -2
- {dirsql-0.4.53 → dirsql-0.4.55}/README.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/dirsql/__init__.py +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/dirsql/_async.py +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/dirsql/_dirsql.pyi +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/dirsql/cli/__init__.py +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/dirsql/cli/discover_plugins/__init__.py +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/dirsql/cli/discover_plugins/discovered_fragments.py +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/dirsql/cli/discover_plugins/discovery_disabled.py +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/dirsql/cli/discover_plugins/fragment_path.py +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/dirsql/cli/discover_plugins/user_passed_config.py +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/dirsql/cli/discover_plugins/with_discovered_plugins.py +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/dirsql/cli/resolve_config_extensions.py +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/dirsql/plan_entry_path.py +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/dirsql/py.typed +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/dirsql/read_config.py +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/dirsql/resolve_configs_extension_specs.py +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/dirsql/resolve_extension.py +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/dirsql/resolve_package.py +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/.claude/CLAUDE.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/.vitepress/config.ts +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/.vitepress/theme/index.ts +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/.vitepress/theme/lang.ts +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/AGENTS.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/explanation.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/getting-started.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/howto/columns-from-paths.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/howto/define-tables.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/howto/embed.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/howto/extract-from-contents.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/howto/load-extension.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/howto/parse-files-into-columns.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/howto/persist.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/howto/query-json.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/howto/query-without-config.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/howto/react-to-changes.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/howto/search-by-meaning.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/howto/search-indexes.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/howto/skip-files.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/howto/write-a-plugin.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/index.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/package.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/plugins.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/pnpm-lock.yaml +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/pnpm-workspace.yaml +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/reference/cli.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/reference/columns.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/reference/config.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/reference/hooks.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/reference/http-api.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/reference/path-tables.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/docs/reference/sdk.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/CHANGELOG.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/MIGRATIONS.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/README.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-07-13-drop-cwd-config-auto-detect.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-07-13-plugin-discovery.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-07-13-rename-extract-to-on-file.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-07-13-repeatable-config.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-07-13-sdk-default-baked-in-config.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-07-20-drop-implicit-files-table.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-07-21-remove-glob-captures.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-07-24-hookless-table-config-error.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-07-24-remove-stat-fact-injection.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-07-29-restore-python-310.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-08-02-release-profile.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-08-02-scan-failures.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-08-03-discovery-ext-resolution.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-08-03-manylinux-dynamic-binary.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-08-03-python-no-ignore.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-08-04-cast-lints.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-08-04-cli-in-process.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-08-20-curtaincall-dev-dependency.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-08-20-declared-table-name.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-09-04-config-paths-from-argv-module.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-09-05-config-extension-loader-split.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-09-05-resolve-config-extensions-split.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-09-05-resolve-extension-split.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-09-09-launcher-config-path-scan.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-09-17-extension-resolution-via-core.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-09-18-export-scan-failure.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-09-18-flatten-row-event-in-core.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-09-18-programmatic-extension-plan.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/conftest.py +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/.claude/CLAUDE.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/.vitepress/config.ts +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/.vitepress/theme/index.ts +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/.vitepress/theme/lang.ts +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/AGENTS.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/explanation.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/getting-started.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/howto/columns-from-paths.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/howto/define-tables.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/howto/embed.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/howto/extract-from-contents.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/howto/load-extension.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/howto/parse-files-into-columns.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/howto/persist.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/howto/query-json.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/howto/query-without-config.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/howto/react-to-changes.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/howto/search-by-meaning.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/howto/search-indexes.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/howto/skip-files.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/howto/write-a-plugin.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/index.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/package.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/plugins.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/pnpm-lock.yaml +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/pnpm-workspace.yaml +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/reference/cli.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/reference/columns.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/reference/config.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/reference/hooks.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/reference/http-api.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/reference/path-tables.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/docs/reference/sdk.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/cc-keen-knuth-f11gyq.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-1056-py-ofpf9.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-1066-p1-resolve-extension.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-1078-argv-config-paths-core.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-1079-p2-resolve-config-extensions.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-1080-share-vtab-scaffolding.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-1081-indicatif-progress.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-1096-watch-moved-dir.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-1109-watch-moved-out.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-1119-ext-plan.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-1120-py-ext.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-1122-ext-cleanup.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-1130-codec-crates.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-1131-flatten-row-event.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-1139-sse-flatten.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-1140-scan-failure-export.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-1148-clippy-all-targets.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-819-oneshot-timeout.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-827-unquote-doubled-quotes.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-epic-953-slice2-reedline.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-epic-953-slice3-format.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-epic-953-stacked-prs-x59wm3.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-github-issue-825-e4mhhp.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-issue-951-0eease.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-issue-962-0jjrfv.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-issue-986-red-test-e7sjrb.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-tackle-1034-cachesplit.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-tackle-1042-py12.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-tackle-956-xzen74.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-tackle-957-lrm0z6-worker-calls.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-tackle-957-lrm0z6.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/e2e-attestations/claude-tackle-975-n8mc2h.json +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/migrations.d/2026-07-13-drop-cwd-config-auto-detect.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/migrations.d/2026-07-13-rename-extract-to-on-file.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/migrations.d/2026-07-13-sdk-default-baked-in-config.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/migrations.d/2026-07-20-drop-implicit-files-table.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/migrations.d/2026-07-21-remove-glob-captures.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/migrations.d/2026-07-24-hookless-table-config-error.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/migrations.d/2026-07-24-remove-stat-fact-injection.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/migrations.d/2026-07-29-restore-python-310.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/migrations.d/2026-08-04-cli-in-process.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/migrations.d/2026-08-20-declared-table-name.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/src/lib.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/testing-conventions.toml +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/tests/__init__.py +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/tests/conftest.py +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/tests/e2e/__init__.py +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/tests/e2e/fixtures/dirsql_plugin_fixture/__init__.py +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/tests/e2e/fixtures/dirsql_plugin_fixture/dirsql.toml +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/tests/integration/__init__.py +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/tests/integration/binding/__init__.py +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/python/tests/integration/hermetic/__init__.py +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/CHANGELOG.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/MIGRATIONS.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/README.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/benches/db_bench.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/benches/differ_bench.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/benches/matcher_bench.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/benches/scanner_bench.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/docs/explanation.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/docs/getting-started.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/docs/howto/columns-from-paths.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/docs/howto/define-tables.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/docs/howto/embed.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/docs/howto/extract-from-contents.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/docs/howto/load-extension.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/docs/howto/parse-files-into-columns.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/docs/howto/persist.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/docs/howto/query-json.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/docs/howto/query-without-config.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/docs/howto/react-to-changes.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/docs/howto/search-by-meaning.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/docs/howto/search-indexes.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/docs/howto/skip-files.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/docs/howto/write-a-plugin.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/docs/index.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/docs/plugins.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/docs/reference/cli.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/docs/reference/columns.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/docs/reference/config.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/docs/reference/hooks.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/docs/reference/http-api.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/docs/reference/path-tables.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/docs/reference/sdk.md +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/bin/dirsql.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/cli/init.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/cli/mod.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/cli/repl.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/cli/router.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/cli/run.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/cli/server.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/command.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/config.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/default_config.toml +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/differ.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/extension_resolution.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/functions.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/infer.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/launcher.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/matcher.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/parsed_cache.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/parsed_vtab.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/path_table.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/persist.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/progress.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/row_event_flat.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/scanner.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/sql_literal.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/vtab.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/vtab_scaffold.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/packages/rust/src/watcher.rs +0 -0
- {dirsql-0.4.53 → dirsql-0.4.55}/pyproject.toml +0 -0
|
@@ -552,7 +552,7 @@ checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8"
|
|
|
552
552
|
|
|
553
553
|
[[package]]
|
|
554
554
|
name = "dirsql"
|
|
555
|
-
version = "0.4.
|
|
555
|
+
version = "0.4.55"
|
|
556
556
|
dependencies = [
|
|
557
557
|
"assert_cmd",
|
|
558
558
|
"axum",
|
|
@@ -599,7 +599,7 @@ dependencies = [
|
|
|
599
599
|
|
|
600
600
|
[[package]]
|
|
601
601
|
name = "dirsql-py-ext"
|
|
602
|
-
version = "0.4.
|
|
602
|
+
version = "0.4.55"
|
|
603
603
|
dependencies = [
|
|
604
604
|
"dirsql",
|
|
605
605
|
"pyo3",
|
|
@@ -2451,6 +2451,7 @@ version = "1.0.149"
|
|
|
2451
2451
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2452
2452
|
checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
|
|
2453
2453
|
dependencies = [
|
|
2454
|
+
"indexmap",
|
|
2454
2455
|
"itoa",
|
|
2455
2456
|
"memchr",
|
|
2456
2457
|
"serde",
|
|
@@ -16,7 +16,9 @@ repository = "https://github.com/thekevinscott/dirsql"
|
|
|
16
16
|
[workspace.dependencies]
|
|
17
17
|
dirsql = { path = "packages/rust" }
|
|
18
18
|
serde = { version = "1", features = ["derive"] }
|
|
19
|
-
|
|
19
|
+
# `preserve_order`: a serialized row must keep the projection order the SELECT
|
|
20
|
+
# list asked for, which the default BTreeMap-backed object discards.
|
|
21
|
+
serde_json = { version = "1", features = ["preserve_order"] }
|
|
20
22
|
regex = "1"
|
|
21
23
|
thiserror = "2"
|
|
22
24
|
tokio = { version = "1", features = ["rt", "sync"] }
|
|
@@ -18,27 +18,21 @@ from .discover_plugins.with_discovered_plugins import with_discovered_plugins
|
|
|
18
18
|
from .resolve_config_extensions import with_resolved_extensions
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
def
|
|
22
|
-
"""
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
`run_cli` is only reached with this installed, and it returns promptly for
|
|
35
|
-
every non-server command.
|
|
21
|
+
def keep_sigint_fatal(handler=signal.signal):
|
|
22
|
+
"""Give SIGINT its default disposition for the core's run, returning the prior one.
|
|
23
|
+
|
|
24
|
+
No Python-level handler can end a run in progress: `run_cli` detaches the
|
|
25
|
+
GIL for its whole duration, so nothing reaches the eval loop until the
|
|
26
|
+
core has already finished — CPython's `default_int_handler` included. Only
|
|
27
|
+
a disposition the kernel acts on by itself works, which is `SIG_DFL`, and
|
|
28
|
+
it is what the standalone binary runs with.
|
|
29
|
+
|
|
30
|
+
`dirsql server` keeps its exit code: signal-hook (which tokio uses)
|
|
31
|
+
replaces the disposition when the server registers its handlers, and does
|
|
32
|
+
not re-raise `SIG_DFL` afterwards, so the core's graceful shutdown is the
|
|
33
|
+
only thing that acts and its 0 survives.
|
|
36
34
|
"""
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
def with_core_owned_signals(handler=signal.signal):
|
|
40
|
-
"""Install `_absorb_interrupt` for SIGINT and return the prior handler."""
|
|
41
|
-
return handler(signal.SIGINT, _absorb_interrupt)
|
|
35
|
+
return handler(signal.SIGINT, signal.SIG_DFL)
|
|
42
36
|
|
|
43
37
|
|
|
44
38
|
def main(argv: list[str] | None = None) -> int:
|
|
@@ -56,7 +50,7 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
56
50
|
print(f"dirsql: {exc}", file=sys.stderr)
|
|
57
51
|
return 1
|
|
58
52
|
|
|
59
|
-
previous =
|
|
53
|
+
previous = keep_sigint_fatal()
|
|
60
54
|
try:
|
|
61
55
|
return run_in_process(argv=argv, module="dirsql._dirsql")
|
|
62
56
|
except Exception as exc:
|
|
@@ -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.55"
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
**Fixed** Ctrl-C now ends a `dirsql` run that is still in progress. The launcher installed an empty SIGINT handler for the whole of the core's run, and because the core detaches the GIL for that call no Python handler can run until the work has already finished — so a signal sent during a long directory scan was swallowed and the process was SIGTERM-only. SIGINT is left at its default disposition instead, which the kernel acts on immediately, matching the standalone binary. `dirsql server`'s graceful shutdown still exits 0.
|
|
@@ -14,4 +14,4 @@ Each PR that touches this package's public-facing source adds one file here:
|
|
|
14
14
|
Fragments are **permanent and append-only** — nothing is ever assembled back
|
|
15
15
|
into a single `CHANGELOG.md`, and the release↔entry mapping comes from
|
|
16
16
|
`git log --tags`. This README is not a fragment and never satisfies the
|
|
17
|
-
changelog gate. See
|
|
17
|
+
changelog gate. See `agents/reference/changelog-migrations.md`.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
### SIGINT ends a run in progress through the Python launcher
|
|
2
|
+
|
|
3
|
+
**Summary**
|
|
4
|
+
|
|
5
|
+
The `dirsql` console script installed an empty SIGINT handler for the duration of the core's run. A signal arriving during a long directory scan was therefore discarded, and the process could only be ended with SIGTERM. SIGINT is now left at its default disposition for that window, so the kernel terminates the process immediately. No API changes; the observable difference is that a signal that used to do nothing now ends the process with the usual 128+SIGINT status.
|
|
6
|
+
|
|
7
|
+
**Required changes**
|
|
8
|
+
|
|
9
|
+
| Before | After |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| `kill -INT <pid>` during a query: ignored; the run continues to completion | `kill -INT <pid>` during a query: the process dies of SIGINT (shell reports `130`) |
|
|
12
|
+
| Ctrl-C while the REPL is executing a statement: ignored | Ctrl-C while the REPL is executing a statement: the session ends |
|
|
13
|
+
|
|
14
|
+
A script that sent SIGINT to a `dirsql` process and relied on it being ignored must stop sending it. A script that escalated to SIGTERM after an ignored SIGINT can drop the escalation.
|
|
15
|
+
|
|
16
|
+
`dirsql server` is unchanged: its graceful shutdown still exits `0` on SIGINT and SIGTERM. Ctrl-C at an idle REPL prompt is unchanged too — reedline reads it as a key event, not a signal.
|
|
17
|
+
|
|
18
|
+
**Deprecations removed**
|
|
19
|
+
|
|
20
|
+
_None._
|
|
21
|
+
|
|
22
|
+
**Behavior changes without code changes**
|
|
23
|
+
|
|
24
|
+
The exit status of an interrupted run changes from "no exit" to death by SIGINT. This aligns the Python launcher with the standalone `dirsql` binary, which has always behaved this way.
|
|
25
|
+
|
|
26
|
+
**Verification**
|
|
27
|
+
|
|
28
|
+
Against a directory large enough to take a few seconds to scan:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
dirsql "SELECT count(*) FROM './'" # press Ctrl-C while it runs
|
|
32
|
+
echo $?
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Expected: the process ends promptly and the shell reports `130`. Before this change it kept running and the SIGINT was discarded. Run it in the foreground: a non-interactive shell sets SIGINT to `SIG_IGN` for `&` background jobs, which hides the difference.
|
|
@@ -15,5 +15,5 @@ the API adds one file here:
|
|
|
15
15
|
`_None._` where a subsection does not apply.
|
|
16
16
|
|
|
17
17
|
Fragments are **permanent and append-only** — nothing is assembled back into a
|
|
18
|
-
single `MIGRATIONS.md`. This README is not a fragment. See
|
|
19
|
-
|
|
18
|
+
single `MIGRATIONS.md`. This README is not a fragment. See
|
|
19
|
+
`agents/reference/changelog-migrations.md`.
|
|
@@ -6,7 +6,7 @@ description = "Ephemeral SQL index over a local directory"
|
|
|
6
6
|
# version stays for the binding crates (publish = false). The literal
|
|
7
7
|
# intentionally lags the published version: putitoutthere rewrites it to
|
|
8
8
|
# the planned release version at build time and never commits it back.
|
|
9
|
-
version = "0.4.
|
|
9
|
+
version = "0.4.55"
|
|
10
10
|
edition.workspace = true
|
|
11
11
|
# Literal `license` (not `license.workspace = true`) because
|
|
12
12
|
# putitoutthere's preflight check reads `[package].license` directly
|
|
@@ -15,7 +15,7 @@ use serde::Deserialize;
|
|
|
15
15
|
use serde_json::Value;
|
|
16
16
|
|
|
17
17
|
use super::AppState;
|
|
18
|
-
use super::serialize::
|
|
18
|
+
use super::serialize::result_to_json;
|
|
19
19
|
use crate::{DirSQL, DirSqlError};
|
|
20
20
|
|
|
21
21
|
/// Why a query failed, classified independently of transport. The HTTP
|
|
@@ -66,10 +66,14 @@ pub async fn execute_query(
|
|
|
66
66
|
|
|
67
67
|
let db = require_ready(state)?;
|
|
68
68
|
|
|
69
|
-
let join = run_bounded(
|
|
69
|
+
let join = run_bounded(
|
|
70
|
+
timeout,
|
|
71
|
+
tokio::task::spawn_blocking(move || db.query_ordered(&sql)),
|
|
72
|
+
)
|
|
73
|
+
.await?;
|
|
70
74
|
|
|
71
75
|
match join {
|
|
72
|
-
Ok(Ok(
|
|
76
|
+
Ok(Ok(result)) => Ok(Value::Array(result_to_json(&result))),
|
|
73
77
|
Ok(Err(err)) => Err(classify_query_error(err)),
|
|
74
78
|
Err(join_err) => Err(QueryFailure::Internal(join_err.to_string())),
|
|
75
79
|
}
|
|
@@ -2,13 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
use serde_json::{Map, Value};
|
|
4
4
|
|
|
5
|
-
use crate::Row;
|
|
6
5
|
use crate::db::Value as CellValue;
|
|
7
6
|
use crate::differ::RowEvent;
|
|
8
7
|
use crate::row_event_flat::flatten_row_event;
|
|
8
|
+
use crate::{QueryResult, Row};
|
|
9
|
+
|
|
10
|
+
/// Serialize a query result, each object keyed in projection order. Row events
|
|
11
|
+
/// carry no projection, so they keep going through [`row_to_json`].
|
|
12
|
+
pub(super) fn result_to_json(result: &QueryResult) -> Vec<Value> {
|
|
13
|
+
result
|
|
14
|
+
.rows
|
|
15
|
+
.iter()
|
|
16
|
+
.map(|row| ordered_row_to_json(&result.columns, row))
|
|
17
|
+
.collect()
|
|
18
|
+
}
|
|
9
19
|
|
|
10
|
-
|
|
11
|
-
|
|
20
|
+
fn ordered_row_to_json(columns: &[String], row: &Row) -> Value {
|
|
21
|
+
let mut map = Map::with_capacity(columns.len());
|
|
22
|
+
for column in columns {
|
|
23
|
+
if let Some(value) = row.get(column) {
|
|
24
|
+
map.insert(column.clone(), cell_to_json(value));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
Value::Object(map)
|
|
12
28
|
}
|
|
13
29
|
|
|
14
30
|
pub(super) fn row_to_json(row: &Row) -> Value {
|
|
@@ -75,6 +91,35 @@ mod tests {
|
|
|
75
91
|
assert_eq!(json.get("count").and_then(Value::as_i64), Some(3));
|
|
76
92
|
}
|
|
77
93
|
|
|
94
|
+
#[test]
|
|
95
|
+
fn a_result_serializes_its_rows_in_projection_order() {
|
|
96
|
+
let mut row: Row = HashMap::new();
|
|
97
|
+
row.insert("title".into(), CellValue::Text("Hello".into()));
|
|
98
|
+
row.insert("count".into(), CellValue::Integer(3));
|
|
99
|
+
let result = QueryResult {
|
|
100
|
+
columns: vec!["count".into(), "title".into()],
|
|
101
|
+
rows: vec![row],
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
let json = result_to_json(&result);
|
|
105
|
+
|
|
106
|
+
assert_eq!(json[0].to_string(), r#"{"count":3,"title":"Hello"}"#);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
#[test]
|
|
110
|
+
fn a_column_no_row_key_matches_is_left_out() {
|
|
111
|
+
let mut row: Row = HashMap::new();
|
|
112
|
+
row.insert("title".into(), CellValue::Text("Hello".into()));
|
|
113
|
+
let result = QueryResult {
|
|
114
|
+
columns: vec!["title".into(), "title".into()],
|
|
115
|
+
rows: vec![row],
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
let json = result_to_json(&result);
|
|
119
|
+
|
|
120
|
+
assert_eq!(json[0].to_string(), r#"{"title":"Hello"}"#);
|
|
121
|
+
}
|
|
122
|
+
|
|
78
123
|
#[test]
|
|
79
124
|
fn insert_event_emits_expected_shape() {
|
|
80
125
|
let mut row: Row = HashMap::new();
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
//! swallowing the table; laying the table out to the terminal's width, and
|
|
12
12
|
//! paging a long result, are both out of scope.
|
|
13
13
|
|
|
14
|
-
use std::collections::
|
|
14
|
+
use std::collections::HashSet;
|
|
15
15
|
|
|
16
16
|
use serde_json::Value;
|
|
17
17
|
|
|
@@ -53,16 +53,22 @@ pub(super) fn render(rows: &[Value]) -> String {
|
|
|
53
53
|
out
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
/// Every column any row carries. Rows are JSON objects
|
|
57
|
-
///
|
|
56
|
+
/// Every column any row carries, first seen first. Rows are JSON objects
|
|
57
|
+
/// serialized in projection order, so that is the order the SELECT list asked
|
|
58
|
+
/// for -- and the same order the JSON rendering of this result prints.
|
|
58
59
|
fn columns(rows: &[Value]) -> Vec<String> {
|
|
59
|
-
let mut
|
|
60
|
+
let mut seen = HashSet::new();
|
|
61
|
+
let mut names = Vec::new();
|
|
60
62
|
for row in rows {
|
|
61
63
|
if let Value::Object(map) = row {
|
|
62
|
-
|
|
64
|
+
for key in map.keys() {
|
|
65
|
+
if seen.insert(key.clone()) {
|
|
66
|
+
names.push(key.clone());
|
|
67
|
+
}
|
|
68
|
+
}
|
|
63
69
|
}
|
|
64
70
|
}
|
|
65
|
-
names
|
|
71
|
+
names
|
|
66
72
|
}
|
|
67
73
|
|
|
68
74
|
/// One row's cells, in column order. A row missing a column renders it as
|
|
@@ -242,6 +248,25 @@ mod tests {
|
|
|
242
248
|
}
|
|
243
249
|
}
|
|
244
250
|
|
|
251
|
+
#[test]
|
|
252
|
+
fn the_header_keeps_the_order_the_row_carries() {
|
|
253
|
+
// Rows arrive serialized in projection order; re-sorting them here is
|
|
254
|
+
// what made `SELECT size, basename` print `basename size`.
|
|
255
|
+
let table = rendered([row([
|
|
256
|
+
("size", Value::from(6)),
|
|
257
|
+
("basename", Value::from("a.md")),
|
|
258
|
+
])]);
|
|
259
|
+
|
|
260
|
+
assert!(table.starts_with("size basename\n"), "{table:?}");
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
#[test]
|
|
264
|
+
fn a_later_rows_new_columns_come_after_the_earlier_ones() {
|
|
265
|
+
let table = rendered([row([("b", Value::from(1))]), row([("a", Value::from(2))])]);
|
|
266
|
+
|
|
267
|
+
assert!(table.starts_with("b a\n"), "{table:?}");
|
|
268
|
+
}
|
|
269
|
+
|
|
245
270
|
#[test]
|
|
246
271
|
fn every_column_any_row_carries_is_shown() {
|
|
247
272
|
// A ragged result must not silently drop the columns only some rows
|
|
@@ -244,6 +244,13 @@ pub fn ensure_internal_rows_table(conn: &Connection) -> rusqlite::Result<()> {
|
|
|
244
244
|
)
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
+
/// One query's rows plus the column order the SELECT list asked for.
|
|
248
|
+
#[derive(Debug, Clone, PartialEq)]
|
|
249
|
+
pub struct QueryResult {
|
|
250
|
+
pub columns: Vec<String>,
|
|
251
|
+
pub rows: Vec<HashMap<String, Value>>,
|
|
252
|
+
}
|
|
253
|
+
|
|
247
254
|
pub struct Db {
|
|
248
255
|
conn: Connection,
|
|
249
256
|
/// The directory a path-table's glob is resolved against. `None` disables
|
|
@@ -714,6 +721,14 @@ impl Db {
|
|
|
714
721
|
/// internal writes (`insert_row`, delete-by-file, persist), which never go
|
|
715
722
|
/// through `query()`, are unaffected.
|
|
716
723
|
pub fn query(&self, sql: &str) -> Result<Vec<HashMap<String, Value>>> {
|
|
724
|
+
self.query_ordered(sql).map(|result| result.rows)
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
/// [`query`](Self::query), plus the projection order. A row is a
|
|
728
|
+
/// `HashMap`, so the order the SELECT list asked for survives only in
|
|
729
|
+
/// [`QueryResult::columns`]; a renderer that re-derives its columns from
|
|
730
|
+
/// row keys prints them alphabetically instead.
|
|
731
|
+
pub fn query_ordered(&self, sql: &str) -> Result<QueryResult> {
|
|
717
732
|
// Bracket the whole statement, prepare included: a worker-backed
|
|
718
733
|
// function called on every row makes this the slowest thing dirsql
|
|
719
734
|
// does, and the guard is what erases the counter before the caller
|
|
@@ -757,7 +772,10 @@ impl Db {
|
|
|
757
772
|
for row in rows {
|
|
758
773
|
results.push(row?);
|
|
759
774
|
}
|
|
760
|
-
Ok(
|
|
775
|
+
Ok(QueryResult {
|
|
776
|
+
columns: column_names,
|
|
777
|
+
rows: results,
|
|
778
|
+
})
|
|
761
779
|
}
|
|
762
780
|
|
|
763
781
|
/// Prepare `sql` with the internal-table / ATTACH authorizer installed for
|
|
@@ -1026,6 +1044,40 @@ mod tests {
|
|
|
1026
1044
|
assert!(!rows[0].contains_key("_dirsql_row_index"));
|
|
1027
1045
|
}
|
|
1028
1046
|
|
|
1047
|
+
#[test]
|
|
1048
|
+
fn query_ordered_reports_the_select_list_order() {
|
|
1049
|
+
let db = Db::new().unwrap();
|
|
1050
|
+
db.create_table("docs", "CREATE TABLE docs (title TEXT, draft INTEGER)")
|
|
1051
|
+
.unwrap();
|
|
1052
|
+
|
|
1053
|
+
let result = db.query_ordered("SELECT draft, title FROM docs").unwrap();
|
|
1054
|
+
|
|
1055
|
+
assert_eq!(
|
|
1056
|
+
result.columns,
|
|
1057
|
+
vec!["draft".to_string(), "title".to_string()]
|
|
1058
|
+
);
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
#[test]
|
|
1062
|
+
fn query_ordered_carries_the_same_rows_query_returns() {
|
|
1063
|
+
let db = Db::new().unwrap();
|
|
1064
|
+
db.create_table("docs", "CREATE TABLE docs (title TEXT, draft INTEGER)")
|
|
1065
|
+
.unwrap();
|
|
1066
|
+
let row = HashMap::from([
|
|
1067
|
+
("title".into(), Value::Text("Hello".into())),
|
|
1068
|
+
("draft".into(), Value::Integer(0)),
|
|
1069
|
+
]);
|
|
1070
|
+
db.insert_row("docs", &row, "docs/hello.md", 0).unwrap();
|
|
1071
|
+
|
|
1072
|
+
let result = db.query_ordered("SELECT title, draft FROM docs").unwrap();
|
|
1073
|
+
|
|
1074
|
+
assert_eq!(
|
|
1075
|
+
result.rows,
|
|
1076
|
+
db.query("SELECT title, draft FROM docs").unwrap()
|
|
1077
|
+
);
|
|
1078
|
+
assert_eq!(result.rows[0]["title"], Value::Text("Hello".into()));
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1029
1081
|
#[test]
|
|
1030
1082
|
fn pragma_table_info_matches_user_ddl_exactly() {
|
|
1031
1083
|
let db = Db::new().unwrap();
|
|
@@ -77,7 +77,7 @@ use std::time::Duration;
|
|
|
77
77
|
use thiserror::Error;
|
|
78
78
|
|
|
79
79
|
pub use crate::config::ExtensionSpec as Extension;
|
|
80
|
-
pub use crate::db::{DbError, Value};
|
|
80
|
+
pub use crate::db::{DbError, QueryResult, Value};
|
|
81
81
|
pub use crate::differ::RowEvent;
|
|
82
82
|
#[doc(hidden)]
|
|
83
83
|
pub use crate::row_event_flat::{FlatRowEvent, flatten_row_event};
|
|
@@ -404,8 +404,15 @@ impl DirSQL {
|
|
|
404
404
|
/// keeps the ephemeral index consistent with the on-disk files that back
|
|
405
405
|
/// it: mutations only happen through the watcher/indexer pipeline.
|
|
406
406
|
pub fn query(&self, sql: &str) -> Result<Vec<Row>> {
|
|
407
|
+
self.query_ordered(sql).map(|result| result.rows)
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/// [`query`](Self::query), plus the projection order in
|
|
411
|
+
/// [`QueryResult::columns`]. A [`Row`] is a `HashMap`, so a caller that
|
|
412
|
+
/// renders columns in the order the user asked for needs this instead.
|
|
413
|
+
pub fn query_ordered(&self, sql: &str) -> Result<QueryResult> {
|
|
407
414
|
let db = self.inner.db.lock().map_err(DirSqlError::lock)?;
|
|
408
|
-
db.
|
|
415
|
+
db.query_ordered(sql).map_err(map_db_error)
|
|
409
416
|
}
|
|
410
417
|
|
|
411
418
|
/// Lazily create the filesystem watcher. Idempotent; subsequent calls are
|
|
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
|
{dirsql-0.4.53 → dirsql-0.4.55}/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.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-07-20-drop-implicit-files-table.md
RENAMED
|
File without changes
|
{dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-07-21-remove-glob-captures.md
RENAMED
|
File without changes
|
|
File without changes
|
{dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-07-24-remove-stat-fact-injection.md
RENAMED
|
File without changes
|
{dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-07-29-restore-python-310.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dirsql-0.4.53 → dirsql-0.4.55}/packages/python/changelog.d/2026-08-03-discovery-ext-resolution.md
RENAMED
|
File without changes
|