ktx/docs-site/content/docs/cli-reference
Kevin Messiaen 0e2e6c7d90
refactor(mongo-query): consolidate query types and drop unsafe cast
Route the Mongo read path through one canonical request/result shape and
remove the `as unknown as` narrowing flagged in review.

- Add optional executeQuery to KtxScanConnector and narrow by capability
  in the runner, replacing the double cast with a driver + method guard.
- Move KtxMongoQueryInput/KtxMongoQueryResult into context/scan/types.ts;
  delete the duplicate runner request type, the inline MCP-port input, and
  the KtxMongoQueryResponse alias. KtxMongoQueryArgs now extends the base.
- Inline the pass-through executeMongoQuery wrapper.
- Correct the --output default in the mongo-query and sql CLI docs: it is
  TTY/CI/KTX_OUTPUT-derived, not unconditionally pretty.
- Add tests: database override, empty result, parseLimitOption bounds,
  bigint/plural-row/empty-header rendering, and mongo_query_completed
  telemetry fields on both outcomes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ga2tvQ2YCEphmY8HM5Guzq
2026-07-11 21:19:55 +07:00
..
ktx-admin.mdx feat(cli): self-provision pinned uv and defer MCP Python runtime install (#297) 2026-06-12 16:31:06 +00:00
ktx-completion.mdx feat(cli): shell completion for commands, flags, and entity names (#244) 2026-05-31 23:44:33 +02:00
ktx-connection.mdx feat(cli): consistent connection setup recovery and build-time gate (#257) 2026-06-03 11:08:46 +00:00
ktx-ingest.mdx feat(sigma): add Sigma Computing context-source adapter (#316) 2026-07-01 01:14:57 +02:00
ktx-mcp.mdx feat(cli): self-provision pinned uv and defer MCP Python runtime install (#297) 2026-06-12 16:31:06 +00:00
ktx-mongo-query.mdx refactor(mongo-query): consolidate query types and drop unsafe cast 2026-07-11 21:19:55 +07:00
ktx-setup.mdx feat: Add duckdb connector (#308) 2026-07-01 12:06:02 +00:00
ktx-sl.mdx feat(cli): shell completion for commands, flags, and entity names (#244) 2026-05-31 23:44:33 +02:00
ktx-sql.mdx refactor(mongo-query): consolidate query types and drop unsafe cast 2026-07-11 21:19:55 +07:00
ktx-status.mdx fix(cli): survive ktx.yaml version skew and derive repo ownership from disk (#293) 2026-06-11 22:10:47 +02:00
ktx-wiki.mdx feat: ktx batch — scan resilience, analytics SQL craft, connector hardening (#312) 2026-06-29 16:35:57 +00:00
ktx.mdx feat: add GitHub star nudges to CLI build view and docs sidebar (#271) 2026-06-08 16:14:56 +02:00
meta.json docs: document ktx mongo-query command 2026-07-06 20:20:46 +07:00