Sylin.Koan.Data.Connector.Cockroach 0.21.0

dotnet add package Sylin.Koan.Data.Connector.Cockroach --version 0.21.0
                    
NuGet\Install-Package Sylin.Koan.Data.Connector.Cockroach -Version 0.21.0
                    
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="Sylin.Koan.Data.Connector.Cockroach" Version="0.21.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sylin.Koan.Data.Connector.Cockroach" Version="0.21.0" />
                    
Directory.Packages.props
<PackageReference Include="Sylin.Koan.Data.Connector.Cockroach" />
                    
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 Sylin.Koan.Data.Connector.Cockroach --version 0.21.0
                    
#r "nuget: Sylin.Koan.Data.Connector.Cockroach, 0.21.0"
                    
#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 Sylin.Koan.Data.Connector.Cockroach@0.21.0
                    
#: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=Sylin.Koan.Data.Connector.Cockroach&version=0.21.0
                    
Install as a Cake Addin
#tool nuget:?package=Sylin.Koan.Data.Connector.Cockroach&version=0.21.0
                    
Install as a Cake Tool

Sylin.Koan.Data.Connector.Cockroach

Supported CockroachDB provider for Koan Entity persistence over the PostgreSQL wire protocol.

Install

dotnet add package Sylin.Koan.Data.Connector.Cockroach

Meaningful use

Reference the package, call AddKoan(), and use normal Entity verbs. With a reachable CockroachDB endpoint, Koan discovers or reads the connection, selects the provider, creates allowed schema on first use, and persists entities.

builder.Services.AddKoan();

public sealed class Order : Entity<Order>;

await new Order().Save();

Set ConnectionStrings:Cockroach when autonomous discovery is not appropriate. Provider-local DdlPolicy, SchemaMatching, and AllowProductionDdl settings override their safe defaults only for CockroachDB routes.

The same connector can describe an external shape without introducing provider vocabulary:

builder.Services.AddKoan(koan => koan.Data.Source("Legacy").Map<Customer>(map => map
    .Container("CUSTOMER")
    .Key(customer => customer.Id).Name("CUSTOMER_NO")
    .Property(customer => customer.Name).Name("DISPLAY_NM")
    .Property(customer => customer.Profile).Object("PROFILE_JSON")));

External sources can be read-only, inspected through Koan's container/record descriptors, and exposed through bounded registered Query and Scalar operations. Opaque SQL executes only through a configured read lane, where CockroachDB enforces a read-only transaction.

Guarantees and limits

  • Referencing Cockroach activates CockroachDB, not the PostgreSQL connector.
  • Shared Npgsql mechanics do not own discovery, configuration, election, or startup reporting.
  • CRUD, native filters, explicit pages, provider-bounded Entity streams, and all three declared isolation modes use the supported relational/Npgsql foundation.
  • Cockroach uses primary-key ordering where PostgreSQL would use ctid; streams are offset-based, not snapshot-based, resumable, or mutation-safe.
  • CockroachDB serialization failures remain native provider failures. Koan does not automatically replay application work whose safety and idempotence it cannot prove.
  • Schema changes are additive; Koan is not a destructive migration engine.
  • Merely referencing the connector does not make an unused CockroachDB endpoint a readiness dependency. Default election or runtime source use does.
  • A reachable selected CockroachDB service is required. Unsupported SQL/filter semantics reject rather than silently scanning or substituting PostgreSQL.

See TECHNICAL.md for configuration and provider boundaries.

Product Compatible and additional computed target framework versions.
.NET 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
0.21.0 36 7/30/2026
0.20.1 104 7/22/2026
0.20.0 125 7/22/2026