CH.Native.Dapper 1.1.1

There is a newer prerelease version of this package available.
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
                    
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="CH.Native.Dapper" Version="1.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CH.Native.Dapper" Version="1.1.1" />
                    
Directory.Packages.props
<PackageReference Include="CH.Native.Dapper" />
                    
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 CH.Native.Dapper --version 1.1.1
                    
#r "nuget: CH.Native.Dapper, 1.1.1"
                    
#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 CH.Native.Dapper@1.1.1
                    
#: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=CH.Native.Dapper&version=1.1.1
                    
Install as a Cake Addin
#tool nuget:?package=CH.Native.Dapper&version=1.1.1
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
Loading failed