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
<PackageReference Include="Sylin.Koan.Data.Connector.Cockroach" Version="0.21.0" />
<PackageVersion Include="Sylin.Koan.Data.Connector.Cockroach" Version="0.21.0" />
<PackageReference Include="Sylin.Koan.Data.Connector.Cockroach" />
paket add Sylin.Koan.Data.Connector.Cockroach --version 0.21.0
#r "nuget: Sylin.Koan.Data.Connector.Cockroach, 0.21.0"
#:package Sylin.Koan.Data.Connector.Cockroach@0.21.0
#addin nuget:?package=Sylin.Koan.Data.Connector.Cockroach&version=0.21.0
#tool nuget:?package=Sylin.Koan.Data.Connector.Cockroach&version=0.21.0
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 | Versions 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. |
-
net10.0
- Microsoft.Extensions.Configuration (>= 10.0.10)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.10)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Options (>= 10.0.10)
- Npgsql (>= 10.0.3)
- Sylin.Koan.Data.Relational.Npgsql (>= 0.21.0 && < 0.22.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.