docs(postgres): cite code by name, not by line - #636
Merged
Conversation
postgres.md pinned 17 citations to line numbers in postgres.ts, sql-base.ts and query-limiter.ts, and every checkable one was stale: validate() cited :264 is declared at :1005, getCapabilities() cited :250 at :955, and the three sql-base.ts methods missed by -16, +3 and +3. Each now names the declaration and links the file the way mssql.md, mysql.md, oracle.md and mongodb.md already do; the two range citations name the CTE_*_INFO consts the ranges used to cover. The doc joins NAMED_CITATIONS in the guard, so it can carry no `.ts:<line>` and every method it names must really be declared in postgres.ts. Reverting the doc alone fails 1 of 29. Fixes libredb#589 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Member
|
Thanks @7487 great work |
This was referenced Sep 7, 2026
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/postgres.mdcited code by line number in 17 places on today'smain(the issue counted 18; thefactory.ts:62one already went with #629). Every checkable one was stale, and not by a little:postgres.tshas grown by roughly 900 lines above the cited methods, sogetCapabilities()cited:250is declared at:955,validate()cited:264at:1005,query()cited:378at:1177,runMaintenance()cited:762at:1696. The threesql-base.tsmethods missed by -16, +3 and +3, andanalyzeQuery()citedquery-limiter.ts:88is declared at:177.Each citation now names the declaration and links the file without a coordinate, the shape
mssql.md,mysql.md,oracle.mdandmongodb.mdalready use. The two range citations (:86–177,:148–150) pointed into the schema SQL, which has since been hoisted to module scope, so they now name what they meant: theCTE_*_INFOconsts for theAS MATERIALIZEDclaim, andCTE_FK_INFOfor the two-columnconstraint_column_usagejoin. No sentence changed meaning.The doc joins
NAMED_CITATIONSintests/unit/provider-docs-monitoring-citations.test.ts, withpostgres.tsas its source and the nine methods that now stand where a line number used to. The list's two tests then assert the doc carries no.ts:<line>anywhere and that every name it cites is really declared.Type of Change
Related Issue
Fixes #589
Changes Made
docs/providers/postgres.md: 17 citations rewritten, no product codetests/unit/provider-docs-monitoring-citations.test.ts: oneNAMED_CITATIONSentryTesting
Measured on this branch:
bun test tests/unit/provider-docs-monitoring-citations.test.tspostgres.md cites no line number anywhere)grep -oE '\.ts:[0-9]+' docs/providers/postgres.mdreturns nothing.bun run format,bun run lint(0 errors),bun run typecheckandbun run knipare clean.bun run test: the hooks, security, evals and components layers all pass; the unit/api/integration layer passes except the chart tests withouthelmon PATH (#570),sqlite-driverunder Bun 1.3.11 (nonode:sqlite; the repo pins 1.4.2) andpackaging-standalone-zipwithout a standalone build. None of those touch these two files.Test Environment
Checklist