CH.Native.Dapper
1.1.1
See the version list below for details.
dotnet add package CH.Native.Dapper --version 1.1.1
NuGet\Install-Package CH.Native.Dapper -Version 1.1.1
<PackageReference Include="CH.Native.Dapper" Version="1.1.1" />
<PackageVersion Include="CH.Native.Dapper" Version="1.1.1" />
<PackageReference Include="CH.Native.Dapper" />
paket add CH.Native.Dapper --version 1.1.1
#r "nuget: CH.Native.Dapper, 1.1.1"
#:package CH.Native.Dapper@1.1.1
#addin nuget:?package=CH.Native.Dapper&version=1.1.1
#tool nuget:?package=CH.Native.Dapper&version=1.1.1
CH.Native.Dapper
Dapper integration for CH.Native, the high-performance .NET client for ClickHouse using the native binary TCP protocol.
By default, Dapper expands array parameters (int[], string[], etc.) into SQL tuples — fine for most databases, wrong for ClickHouse, where you usually want them bound as Array(T) on the wire. This package registers Dapper type handlers that send arrays as native ClickHouse arrays.
Install
dotnet add package CH.Native.Dapper
Usage
Call Register() once during startup:
using CH.Native.Dapper;
ClickHouseDapperIntegration.Register();
Then use array parameters as you would expect:
using var connection = new ClickHouseDbConnection("Host=localhost;Database=default");
await connection.OpenAsync();
var ids = new[] { 1, 2, 3, 4, 5 };
var rows = await connection.QueryAsync<MyRow>(
"SELECT * FROM events WHERE id IN (SELECT arrayJoin(@ids))",
new { ids });
Without this package, Dapper would rewrite @ids into (@ids1, @ids2, ...). With it, @ids is sent as a single Array(Int32) parameter.
Registered types
bool[], sbyte[], short[], int[], long[], byte[], ushort[], uint[], ulong[], float[], double[], decimal[], string[], Guid[], DateTime[], DateTimeOffset[], DateOnly[].
Register() is idempotent — repeated calls are no-ops.
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 is compatible. 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. |
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.1.2-prerelease.33 | 43 | 5/30/2026 |
| 1.1.2-prerelease.32 | 54 | 5/30/2026 |
| 1.1.2-prerelease.31 | 57 | 5/20/2026 |
| 1.1.2-prerelease.30 | 49 | 5/18/2026 |
| 1.1.2-prerelease.29 | 61 | 5/17/2026 |
| 1.1.2-prerelease.28 | 47 | 5/17/2026 |
| 1.1.2-prerelease.27 | 47 | 5/17/2026 |
| 1.1.2-prerelease.26 | 48 | 5/15/2026 |
| 1.1.1 | 101 | 5/9/2026 |
| 1.1.1-prerelease.25 | 57 | 5/9/2026 |
| 1.1.1-prerelease.24 | 72 | 5/8/2026 |
| 1.1.1-prerelease.23 | 54 | 5/7/2026 |
| 1.1.0 | 89 | 5/6/2026 |
| 1.1.0-prerelease.22 | 49 | 5/6/2026 |
| 1.0.1-prerelease.21 | 51 | 5/6/2026 |
| 1.0.1-prerelease.20 | 42 | 5/6/2026 |
| 1.0.1-prerelease.19 | 49 | 5/5/2026 |
| 1.0.1-prerelease.18 | 56 | 5/4/2026 |
| 1.0.1-prerelease.17 | 54 | 5/2/2026 |
| 1.0.1-prerelease.15 | 55 | 4/26/2026 |