Repository navigation
Keep pluggable connection as a narrow internal chDB experiment (follow-up to #879) - #880
Merged
Merged
Conversation
let's not make this into a plugin system yet, keeping as an experiment
…xperiment Move the rationale into the `connection?` JSDoc: it is a deliberately narrow, experimental hook to unblock the chDB integration, not a public pluggable-backend system. Explains why the `Connection` contract is not re-exported from the package entrypoint (deep-import friction is by design). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR narrows the previously-introduced pluggable connection injection point to a deliberately small @experimental hook intended for the chDB integration, reducing the implied long-term public plugin surface.
Changes:
- Removed public entrypoint re-exports of the low-level
Connection<Stream>contract types from@clickhouse/client(Node). - Updated the
connection?: ...option JSDoc and trimmed the corresponding CHANGELOG entry to emphasize the chDB-focused experimental intent. - Deleted the design doc that described a broader pluggable-backend system (
docs/design/pluggable-connection.md).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/client-node/src/index.ts | Removes public re-exports of the Connection/Conn* contract types from the Node package entrypoint. |
| packages/client-node/src/config.ts | Reframes the connection? option JSDoc as a narrow internal experiment and links to chDB context. |
| packages/client-node/src/client.ts | Adjusts inline comments to match the narrowed “chDB-only experimental” framing. |
| docs/design/pluggable-connection.md | Deletes the broader pluggable-connection design document. |
| CHANGELOG.md | Trims the previously-added feature note for connection?, but currently under-documents the export-surface change. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Addresses PR #880 review: the connection JSDoc described the Connection contract as "public", which contradicts this PR's intent — it is intentionally not re-exported from the package entrypoint. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What this does
A small follow-up to #879. It dials the pluggable
connectionoption back from a public plugin surface to a deliberately narrow, internal@experimentalhook whose only intended consumer today is the chDB integration.Concretely:
Connection<Stream>contract (Connection,ConnBaseQueryParams,ConnQueryResult,ConnInsertParams,ConnPingResult,ClickHouseSummary, …) from the@clickhouse/client(Node) entrypoint.docs/design/pluggable-connection.md, which described a fuller pluggable-backend system we are intentionally not committing to yet.CHANGELOGandconnection?JSDoc to state plainly that the field exists to unblock chDB and may change.connection?JSDoc itself, so it lives right where anyone touching the field will read it.The runtime behavior is unchanged: the
make_connectionfactory override still works exactly as merged in #879. This is purely a framing/surface-area change.Why
Two pressures, gently in tension:
Keeping the
Connectiontypes out of the public entrypoint is what enforces this distinction. A backend has to deep-import or structurally match the shape — and that small friction is by design: it signals "unsupported, may change" rather than promising an API we are not ready to own. Nothing internal depends on the re-exports (internal code imports these types from./common), andnpm run typecheckpasses.Next steps (not in this PR)
Feedback very welcome — this is intentionally the smallest step that unblocks chDB while keeping our options open.