Skip to content

docs(druid): cite code by name, not by line - #645

Merged
cevheri merged 1 commit into
libredb:mainfrom
7487:docs/druid-named-citations
Sep 8, 2026
Merged

docs(druid): cite code by name, not by line#645
cevheri merged 1 commit into
libredb:mainfrom
7487:docs/druid-named-citations

Conversation

@7487

@7487 7487 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Description

docs/providers/druid.md cited code by line number in 17 places, and 15 of them were stale (prepareQuery() cited :271, declared at :281; getSchema() :493:513; getOverview() :524:544; query() :328:391; runMaintenance() :471:540; DruidTransport :156:186; and so on). One was wrong on more than its number: quoteUnsafeIntegers() was cited as owned by http-transport.ts:264, but it lives in src/lib/db/utils/json-integers.ts and http-transport.ts imports it, as do the Trino transport and the native EXPLAIN strategy.

Every citation now names the declaration and links the file, the shape mssql.md, mongodb.md and clickhouse.md already use. The doc joins NAMED_CITATIONS in tests/unit/provider-docs-monitoring-citations.test.ts with index.ts as its source and all 18 class members it cites, in declaration order.

Type of Change

  • Documentation update
  • Test addition or update

Related Issue

Fixes #590

Changes Made

  • Rewrite all 17 file.ts:N citations in docs/providers/druid.md to `name()` ([`file.ts`](...)) form; the monitoring rows keep their introspect.ts links.
  • Point the quoteUnsafeIntegers() cite at json-integers.ts, where it is actually declared, and say who shares it.
  • Name DruidQueryResult in the result-type cite and connectionFields under DB_UI_CONFIG.druid in the form-fields cite, where the old text relied on the number alone.
  • Add docs/providers/druid.md to NAMED_CITATIONS, following the clickhouse.md entry's "tracks the doc" convention.

Testing

  • I have tested this locally

  • I have added/updated tests

  • All existing tests pass

  • grep -oE '\.ts:[0-9]+' docs/providers/druid.md returns nothing.

  • bun test tests/unit/provider-docs-monitoring-citations.test.ts — 33 pass, 0 fail. With the doc reverted and the list entry kept, 1 of 33 fails (cites no line number anywhere), so the guard bites.

  • bun test tests/unit/marketplace-copy.test.ts (the other reader of druid.md) — 15 pass.

  • bun run format, oxlint and eslint on the test file — clean.

No product code touched. The getPlaceholder() rows in the same doc are #640's (PR #642); this change does not touch those lines.

druid.md pinned 17 citations to line numbers in index.ts, introspect.ts,
transport.ts, http-transport.ts and db-ui-config.ts, and 15 of them were
stale: prepareQuery() cited :271 is declared at :281, query() :328 at :391,
mapDruidError() :358 at :421, getCapabilities() :151 at :197, getLabels()
:194 at :251, runMaintenance() :471 at :540, getSchema() :493 at :513,
getOverview() :524 at :544, DruidTransport :156 at :186, DruidTransportError
:256 at :286. One was wrong on more than its number: quoteUnsafeIntegers()
was cited as owned by http-transport.ts at :264, but it lives in
src/lib/db/utils/json-integers.ts and http-transport.ts imports it, as do
the Trino transport and the native EXPLAIN strategy. That cite now links the
real file and says who shares it.

Each citation now names the declaration and links the file the way
mssql.md, mongodb.md and clickhouse.md already do; the result-type cite
names DruidQueryResult, the form-fields cite names connectionFields under
DB_UI_CONFIG.druid.

The doc joins NAMED_CITATIONS in the guard with index.ts as its source and
all 18 class members it cites, in declaration order, so it can carry no
`.ts:<line>` and every method it names must really be declared. Reverting
the doc alone fails 1 of 33.

Fixes libredb#590

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@cevheri
cevheri self-requested a review September 8, 2026 07:46
@cevheri cevheri added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 8, 2026
@cevheri
cevheri merged commit 9f34bd2 into libredb:main Sep 8, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs/providers/druid.md: replace 18 stale line-number citations with named citations

2 participants