Link Search Menu Expand Document

Releases for RepoDb.ClickHouse


View the NuGet package here or download it directly here.

RepoDb.ClickHouse - Preview

Released: TBA

New

First release of the dedicated ClickHouse provider for RepoDB, built on top of ClickHouse.Driver. #1242

What’s included

  • ClickHouseBootstrap / ClickHouseGlobalConfiguration.UseClickHouse() — initializes RepoDB for use with ClickHouseConnection (GlobalConfiguration.Setup().UseClickHouse()), mapping the ClickHouseDbSetting, ClickHouseDbHelper, and ClickHouseStatementBuilder to every ClickHouseConnection.
  • ClickHouseConnection, ClickHouseCommand and ClickHouseTransaction — RepoDB-aware subclasses of the driver’s own ADO.NET objects. ClickHouseCommand transparently strips the leading @ RepoDB adds to every parameter name, since ClickHouse.Driver expects unprefixed names. ClickHouseTransaction’s Commit()/Rollback() are no-ops, reflecting that ClickHouse has no traditional ACID transactions.
  • ClickHouseDbSetting — ClickHouse-specific behavior: backtick (`) opening/closing identifier quotes, @ parameter prefix, no table hints, no native upsert keyword, and single-statement command text only (IsMultiStatementExecutable = false).
  • ClickHouseStatementBuilder — generates ClickHouse-flavored SQL for every operation: LIMIT/LIMIT ... OFFSET paging for BatchQuery/skip-take queries, ALTER TABLE ... UPDATE/ALTER TABLE ... DELETE mutations for Update/UpdateAll/Delete, and a plain INSERT for Merge/MergeAll (deduplication deferred to the table engine). Insert/InsertAll throw NotSupportedException for entities with an identity field, since ClickHouse has no identity/auto-increment mechanism.
  • ClickHouseDbHelper — schema/type discovery (GetFields/GetFieldsAsync) sourced from system.columns. GetScopeIdentity/GetScopeIdentityAsync always throw NotSupportedException.
  • ClickHouseDbTypeNameToClientTypeResolver — maps ClickHouse column type names (unwrapping Nullable(...)/LowCardinality(...) and parameterized suffixes) to .NET CLR types.
  • Parameter attributes: ClickHouseType, SourceColumn, SourceColumnNullMapping.
  • Targets .NET 8, .NET 9, and .NET 10.

Known limitations (v1)

  • No identity/auto-increment/sequence of any kind — key values must always be supplied by the caller.
  • No native MERGE/upsert statement — Merge/MergeAll compile to a plain INSERT; use BulkMerge from RepoDb.ClickHouse.BulkOperations for a real matched/unmatched merge.
  • UPDATE/DELETE are asynchronous mutations (ALTER TABLE ... UPDATE/DELETE) applied by background merges, not immediate row-level changes, and the WHERE clause is mandatory.
  • Transactions are accepted for API compatibility only — Commit()/Rollback() are no-ops.
  • Decimal columns require UseCustomDecimals=false on the connection string; otherwise they are returned as the driver’s own ClickHouseDecimal type instead of a plain decimal.
  • Sub-second DateTime64 precision requires an explicit ClickHouseType attribute on the property — a plain DateTime CLR parameter is otherwise inferred as whole-second precision.

Bumps

  • Referenced the RepoDb package.
  • Referenced the ClickHouse.Driver package v1.3.0.