Skip to content

docs(oracle): replace stale line-number citations with named citations - #563

Merged
cevheri merged 1 commit into
libredb:mainfrom
hasnaintypes:docs/542-oracle-named-citations
Sep 5, 2026
Merged

docs(oracle): replace stale line-number citations with named citations#563
cevheri merged 1 commit into
libredb:mainfrom
hasnaintypes:docs/542-oracle-named-citations

Conversation

@hasnaintypes

Copy link
Copy Markdown
Contributor

What changed

docs/providers/oracle.md cited 15 spots in src/lib/db/providers/sql/oracle.ts by line number (oracle.ts:N). None were accurate anymore — the file has grown since they were written. Rewrote each as a named citation (`methodName()` plus a bare [oracle.ts](...) link), matching the convention already used in mssql.md/trino.md. Also fixed one stale factory.ts:77 citation caught by the same guard (the doc's citations were checked as a whole, not just the oracle.ts ones).

Added oracle.md to NAMED_CITATIONS in tests/unit/provider-docs-monitoring-citations.test.ts so a future line-number citation in this file fails CI instead of silently rotting.

Why

Line numbers drift the moment a file changes and nothing checks them; method names are greppable and survive insertions above them.

Fixes #542

@codecov

codecov Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@cevheri cevheri added documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers hacktoberfest-accepted Merged Hacktoberfest PR; counts for the participant labels Sep 5, 2026
@cevheri
cevheri merged commit 1fb87f3 into libredb:main Sep 5, 2026
22 checks passed
@cevheri

cevheri commented Sep 5, 2026

Copy link
Copy Markdown
Member

Merged, thank you. All thirteen named methods resolve to real declarations, the guard now fails when a line citation comes back (checked by putting one back in), and the doc reads the same as before. One line I will align in a follow-up docs PR, not a request to you: the registration sentence links factory.ts without naming createDatabaseProvider(), which mssql.md does.

dchaudhari7177 added a commit to dchaudhari7177/libredb-studio that referenced this pull request Sep 6, 2026
Same defect and same fix as libredb#542 (oracle.md, merged in libredb#563) applied to
docs/providers/mysql.md: 12 citations into mysql.ts and 1 into factory.ts, all
rotted.

Each is re-anchored to the named declaration it describes and the line number
dropped, so the citation cannot go stale on an edit above it. Where the prose
cited an expression rather than a method, the enclosing method or the constant
is named instead:

- 'the pool config' (mysql.ts:114, now inside an unrelated row interface) ->
  buildPoolConfig()
- the transaction rollback timer (mysql.ts:41, a comment) -> the TX_TIMEOUT_MS
  constant
- 'one monitoring field' (mysql.ts:346, a comment) -> slowQueriesEmptyState,
  returned by getLabels()
- the factory citation -> createDatabaseProvider(), as mssql.md does

Every named declaration was confirmed to exist in the source and to match the
visibility-prefixed form the guard's declarationLine() looks for.

mysql.md is added to NAMED_CITATIONS with its eleven methods, so the file is
now guarded against both a reintroduced line number and a renamed method.

Closes libredb#564
cevheri added a commit that referenced this pull request Sep 6, 2026
…ons (#582)

* docs(mysql): replace 13 stale line-number citations with named citations

Same defect and same fix as #542 (oracle.md, merged in #563) applied to
docs/providers/mysql.md: 12 citations into mysql.ts and 1 into factory.ts, all
rotted.

Each is re-anchored to the named declaration it describes and the line number
dropped, so the citation cannot go stale on an edit above it. Where the prose
cited an expression rather than a method, the enclosing method or the constant
is named instead:

- 'the pool config' (mysql.ts:114, now inside an unrelated row interface) ->
  buildPoolConfig()
- the transaction rollback timer (mysql.ts:41, a comment) -> the TX_TIMEOUT_MS
  constant
- 'one monitoring field' (mysql.ts:346, a comment) -> slowQueriesEmptyState,
  returned by getLabels()
- the factory citation -> createDatabaseProvider(), as mssql.md does

Every named declaration was confirmed to exist in the source and to match the
visibility-prefixed form the guard's declarationLine() looks for.

mysql.md is added to NAMED_CITATIONS with its eleven methods, so the file is
now guarded against both a reintroduced line number and a renamed method.

Closes #564

* docs(mysql): quote the slowQueriesEmptyState getLabels() declares

Section 8 of this doc says the sentence had to stop naming a cause. Section
10 went on quoting the version that named it: "enable the Performance
Schema to see them", the wording #463 (e8b0056) replaced. One file
asserted both that the label had changed and that it had not.

Pinned rather than hand-corrected, because a quoted value rots the way a
line number does and the named citations this branch introduced do not
reach it. The guard reads the string literal out of getLabels() and looks
for it in the doc with whitespace collapsed on both sides, so wrapped prose
still matches. It asserts presence only, never absence of the old wording,
because section 8 quotes that deliberately in the past tense.

Both directions measured: editing the label in mysql.ts fails the guard,
and restoring the pre-#463 quotation in the doc fails it too.

---------

Co-authored-by: cevheri <cevheribozoglan@gmail.com>
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 good first issue Good for newcomers hacktoberfest-accepted Merged Hacktoberfest PR; counts for the participant

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs/providers/oracle.md: replace 15 stale line-number citations with named citations

2 participants