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 withClickHouseConnection(GlobalConfiguration.Setup().UseClickHouse()), mapping theClickHouseDbSetting,ClickHouseDbHelper, andClickHouseStatementBuilderto everyClickHouseConnection.ClickHouseConnection,ClickHouseCommandandClickHouseTransaction— RepoDB-aware subclasses of the driver’s own ADO.NET objects.ClickHouseCommandtransparently strips the leading@RepoDB adds to every parameter name, sinceClickHouse.Driverexpects unprefixed names.ClickHouseTransaction’sCommit()/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 ... OFFSETpaging for BatchQuery/skip-take queries,ALTER TABLE ... UPDATE/ALTER TABLE ... DELETEmutations for Update/UpdateAll/Delete, and a plainINSERTfor Merge/MergeAll (deduplication deferred to the table engine). Insert/InsertAll throwNotSupportedExceptionfor entities with an identity field, since ClickHouse has no identity/auto-increment mechanism.ClickHouseDbHelper— schema/type discovery (GetFields/GetFieldsAsync) sourced fromsystem.columns.GetScopeIdentity/GetScopeIdentityAsyncalways throwNotSupportedException.ClickHouseDbTypeNameToClientTypeResolver— maps ClickHouse column type names (unwrappingNullable(...)/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 plainINSERT; use BulkMerge from RepoDb.ClickHouse.BulkOperations for a real matched/unmatched merge. UPDATE/DELETEare asynchronous mutations (ALTER TABLE ... UPDATE/DELETE) applied by background merges, not immediate row-level changes, and theWHEREclause is mandatory.- Transactions are accepted for API compatibility only —
Commit()/Rollback()are no-ops. Decimalcolumns requireUseCustomDecimals=falseon the connection string; otherwise they are returned as the driver’s ownClickHouseDecimaltype instead of a plaindecimal.- Sub-second
DateTime64precision requires an explicit ClickHouseType attribute on the property — a plainDateTimeCLR parameter is otherwise inferred as whole-second precision.
Bumps
- Referenced the
RepoDbpackage. - Referenced the
ClickHouse.Driverpackagev1.3.0.