docs(druid): cite code by name, not by line - #645
Merged
Conversation
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
self-requested a review
September 8, 2026 07:46
cevheri
approved these changes
Sep 8, 2026
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
docs/providers/druid.mdcited 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 byhttp-transport.ts:264, but it lives insrc/lib/db/utils/json-integers.tsandhttp-transport.tsimports 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.mdandclickhouse.mdalready use. The doc joinsNAMED_CITATIONSintests/unit/provider-docs-monitoring-citations.test.tswithindex.tsas its source and all 18 class members it cites, in declaration order.Type of Change
Related Issue
Fixes #590
Changes Made
file.ts:Ncitations indocs/providers/druid.mdto`name()` ([`file.ts`](...))form; the monitoring rows keep theirintrospect.tslinks.quoteUnsafeIntegers()cite atjson-integers.ts, where it is actually declared, and say who shares it.DruidQueryResultin the result-type cite andconnectionFieldsunderDB_UI_CONFIG.druidin the form-fields cite, where the old text relied on the number alone.docs/providers/druid.mdtoNAMED_CITATIONS, following theclickhouse.mdentry'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.mdreturns 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 ofdruid.md) — 15 pass.bun run format,oxlintandeslinton 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.