CH.Toolkit.Modeling 0.0.1-preview.1

This is a prerelease version of CH.Toolkit.Modeling.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package CH.Toolkit.Modeling --version 0.0.1-preview.1
                    
NuGet\Install-Package CH.Toolkit.Modeling -Version 0.0.1-preview.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.Toolkit.Modeling" Version="0.0.1-preview.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CH.Toolkit.Modeling" Version="0.0.1-preview.1" />
                    
Directory.Packages.props
<PackageReference Include="CH.Toolkit.Modeling" />
                    
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.Toolkit.Modeling --version 0.0.1-preview.1
                    
#r "nuget: CH.Toolkit.Modeling, 0.0.1-preview.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.Toolkit.Modeling@0.0.1-preview.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.Toolkit.Modeling&version=0.0.1-preview.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=CH.Toolkit.Modeling&version=0.0.1-preview.1&prerelease
                    
Install as a Cake Tool

CH.Toolkit.Modeling

Fluent schema builder for defining ClickHouse database schemas from C# models.

Key Types

  • SchemaBuilder -- entry point; defines tables, materialized views, and dictionaries
  • TableBuilder<T> -- configures a table from the properties of T (engine, ORDER BY, partitioning, TTL, indexes, projections)
  • ColumnBuilder<T> -- overrides column type, default, codec, TTL, and comment for individual properties
  • MaterializedViewBuilder -- defines materialized views with LINQ or raw SQL select queries
  • DictionaryBuilder -- defines external dictionaries with source, layout, and lifetime

Dependencies

Schema, Query, Types

Usage

using CH.Toolkit.Modeling;

var schema = new SchemaBuilder()
    .Table<Event>()
        .MergeTree()
        .OrderBy(e => new { e.Timestamp, e.UserId })
        .PartitionByMonth(e => e.Timestamp)
        .Column(e => e.EventType).LowCardinalityString().Table
        .Column(e => e.Value).Default("0").Codec("ZSTD").Table
        .Index("idx_type", "event_type", "set(100)", 4)
        .Ttl("timestamp + INTERVAL 90 DAY", "DELETE")
    .Build("analytics");

Column names are automatically converted to snake_case. The builder supports all MergeTree-family engines, replicated variants, Log/Memory/Null, and utility engines (Distributed, Buffer, etc.).

See the root README for full documentation.

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 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 (1)

Showing the top 1 NuGet packages that depend on CH.Toolkit.Modeling:

Package Downloads
CH.Toolkit

ClickHouse schema modeling, migrations, and query building for .NET. Meta-package that includes Types, Sql, Schema, Modeling, Query, Introspection, and Migrations.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.1-preview.3 79 2/23/2026
0.0.1-preview.2 69 2/23/2026
0.0.1-preview.1 70 2/23/2026