-
Notifications
You must be signed in to change notification settings - Fork 11
Refactor client structure #219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
* ClickHouseClient skeleton * null checks * remove parameter * No insert parallelism by default * fix UseSession override * Add Timeout to QueryOptions * Adjust xml comment * Adjust InsertRawStreamAsync for backwards compatibility
* Move ClickHouseConnection logic to Client * update example * fix logging tests * Update client reference when command has its connection changed * fix role override * Isolate database changes to connection * datasource adjustments around disposal * remove unused usings * Don't dispose response in PostStreamAsync * ExecuteRawResultAsync implementation
…lickHouseClient (#209) * move binary insert functionality from BulkCopy to ClickHouseClient * Magic numbers to consts * fix batch insert issues
* examples updates * FINAL performance link
* disable obsolete warnings in tests using BulkCopy * CLAUDE.md update * examples readme update * release notes update
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
…d (prevent stale client reference)
Collaborator
Author
|
Cloud test failures are a cloud issue, not a client issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
mzitnik
approved these changes
Feb 12, 2026
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.
Creates a new class ClickHouseClient that is intended as the primary way of interacting with the database.
Existing ADO.NET functionality now acts as a wrapper around ClickHouseClient, and there should be no breaking changes in terms of their behavior.
Examples and docs updated accordingly.
Note
Medium Risk
Core connection/command execution paths and resource-ownership/disposal semantics were refactored to route through
ClickHouseClient, which could introduce subtle behavioral differences (headers, sessions, database selection, logging) despite extensive test updates.Overview
Refactors the driver so
ClickHouseClientbecomes the primary execution/HTTP/logging surface, and the ADO.NET layer (ClickHouseConnection/ClickHouseCommand) now delegates query execution and streaming to an internal/shared client.This shifts ownership semantics (connections may own or share a client), makes
ChangeDatabaseconnection-scoped (without mutating shared client settings), and removes connection-level implementations ofPingAsync, JSON type registration, header-building, and stream insert in favor of client equivalents.Tests are reorganized accordingly: large new coverage for
QueryOptions/InsertOptions, moved validation and redaction checks toClickHouseClienttests, updated logging assertions toClickHouseLogCategories.Client, and adjusted CI ClickHouse setup to useinstall/starton macOS/Windows. Public surface also changes withClickHouseParameterCollectionbecomingpublic, and the project drops PublicAPI analyzer wiring from the csproj.Written by Cursor Bugbot for commit 321ad52. This will update automatically on new commits. Configure here.