Octonica.ClickHouseClient 4.1.6

dotnet add package Octonica.ClickHouseClient --version 4.1.6
                    
NuGet\Install-Package Octonica.ClickHouseClient -Version 4.1.6
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Octonica.ClickHouseClient" Version="4.1.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Octonica.ClickHouseClient" Version="4.1.6" />
                    
Directory.Packages.props
<PackageReference Include="Octonica.ClickHouseClient" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Octonica.ClickHouseClient --version 4.1.6
                    
#r "nuget: Octonica.ClickHouseClient, 4.1.6"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Octonica.ClickHouseClient@4.1.6
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Octonica.ClickHouseClient&version=4.1.6
                    
Install as a Cake Addin
#tool nuget:?package=Octonica.ClickHouseClient&version=4.1.6
                    
Install as a Cake Tool

Octonica.ClickHouseClient v4.1.6, 2026-09-16

Backward Incompatible Change
  • ExecuteScalar and ExecuteScalarAsync now return null when the result set is empty, matching DbCommand. A SQL NULL is still returned as DBNull.Value. Previously both cases returned DBNull.Value (#94).
  • Generic ExecuteScalar<T> and ExecuteScalarAsync<T> throw ClickHouseException with the error code EmptyResult when the result set is empty. Previously this case threw InvalidCastException.
New Feature
  • Add property ClickHouseCommand.Settings (ClickHouseQuerySettingCollection) for per-query ClickHouse settings sent in the native protocol. Each ClickHouseQuerySetting keeps the original value, a wire-formatted string, and Important/Custom flags. ClickHouseCommand.Extremes now maps to the extremes setting in that collection.

  • Add property ClickHouseCommand.Activity. It allows to pass an OpenTelemetry activity (System.Diagnostics.Activity) with queries executed by the command. The client sends the activity's trace id, span id, W3C trace state and flags in the query so the server can attach the query to the same distributed trace. Overloads of ClickHouseConnection.CreateColumnWriter and CreateColumnWriterAsync accept the same activity for bulk INSERT.

  • Add connection setting BusyConnectionMode (ClickHouseBusyConnectionMode, default Wait). With Throw, a command on a connection that already has an active session throws ClickHouseException with the error code OperationInProgress instead of waiting for the session to be released (#59).

Bug Fix
  • A second synchronous command on the same thread no longer hangs while a data reader or column writer is open on the connection; it throws ClickHouseException with the error code OperationInProgress (#59).
  • ExecuteNonQuery and ExecuteNonQueryAsync no longer break the connection when the server returns an error. The next command on the same connection failed with "The connection is closed."; the connection and its session state are now preserved, matching ExecuteReader and ExecuteScalar (#58).
  • Fixed an error when reading the result of a two-level aggregation: "ClickHouseClient received N out-of-order bucket(s) in the server reply." Servers since v25.9 may produce aggregation buckets out of order (#112).
  • Fixed an error when reading a column with the Replicated serialization mode whose indexes are serialized as UInt64 values: "Unexpected key (8) size when reading a column with 'replicated' serialization." (#112).
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (6)

Showing the top 5 NuGet packages that depend on Octonica.ClickHouseClient:

Package Downloads
Dex.Cap.OnceExecutor.ClickHouse

Package Description

Luck.Dapper.ClickHouse

Package Description

Kronikol.Extensions.ClickHouse.Octonica

Pairs Kronikol.Extensions.ClickHouse with the Octonica.ClickHouseClient (native TCP) driver: typed wrap/DI registration helpers and a compile-time driver adapter (Octonica's ExecuteNonQuery already returns real written-row counts, so the adapter passes them through).

SharpJuice.ClickHouse

Easily writing objects to ClickHouse using bulk insert and ArrayPool for high performance and low memory allocation.

AnyoneDeveloper.ClickHouse.ConnectionPool

Package Description

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Octonica.ClickHouseClient:

Repository Stars
linq2db/linq2db
Linq to database provider.
Version Downloads Last Updated
4.1.6 201 9/16/2026
4.1.4 14,740 5/29/2026
4.1.3 4,823 5/22/2026
3.1.10 1,181 5/21/2026
3.1.9 4,742 5/20/2026
3.1.8 75,610 1/20/2026
3.1.7 251 1/19/2026
3.1.5 10,129 12/22/2025
3.1.3 758,216 3/19/2024
3.1.2 2,745 3/10/2024
3.1.1 31,526 1/16/2024
2.3.2 2,090 12/29/2023
2.2.11 144,089 1/11/2023
2.2.10 2,379 12/30/2022
2.2.9 59,549 4/27/2022
2.2.8 17,407 1/9/2022
2.2.7 1,970 12/4/2021
2.2.4-rc 383 11/23/2021
2.1.2 3,354 11/7/2021
2.1.1 3,202 9/16/2021
Loading failed