Sylin.Koan.Data.Connector.CouchDb
1.0.380
dotnet add package Sylin.Koan.Data.Connector.CouchDb --version 1.0.380
NuGet\Install-Package Sylin.Koan.Data.Connector.CouchDb -Version 1.0.380
<PackageReference Include="Sylin.Koan.Data.Connector.CouchDb" Version="1.0.380" />
<PackageVersion Include="Sylin.Koan.Data.Connector.CouchDb" Version="1.0.380" />
<PackageReference Include="Sylin.Koan.Data.Connector.CouchDb" />
paket add Sylin.Koan.Data.Connector.CouchDb --version 1.0.380
#r "nuget: Sylin.Koan.Data.Connector.CouchDb, 1.0.380"
#:package Sylin.Koan.Data.Connector.CouchDb@1.0.380
#addin nuget:?package=Sylin.Koan.Data.Connector.CouchDb&version=1.0.380
#tool nuget:?package=Sylin.Koan.Data.Connector.CouchDb&version=1.0.380
Sylin.Koan.Data.Connector.CouchDb
Apache CouchDB document storage for Koan. Reference the package, call AddKoan(), and Entity<T>
persistence runs against CouchDB over plain HTTP — no driver package, no vendor client, just
System.Net.Http.
Supported provider (
couchdb-data-provider): the record-plane conformance suite passes against a real CouchDB 3.5 server — conformance, the full filter-convergence corpus plus its pushdown guard, paging windows, capability truth — and the connector is machine-checked under NativeAOT byscripts/aot-verify.ps1. The Limits below are part of the claim.
Install
dotnet add package Sylin.Koan.Data.Connector.CouchDb
{ "Koan": { "Data": { "Sources": { "Default": {
"Adapter": "couchdb",
"ConnectionString": "http://localhost:5984",
"CouchDb": { "UserId": "admin", "Password": "..." } } } } } }
Zero configuration
Start CouchDB with its documented development credentials and use the app unchanged — the adapter
resolves auto to the conventional local endpoint and the credential layering fills the rest:
docker run -d -p 5984:5984 -e COUCHDB_USER=admin -e COUCHDB_PASSWORD=password couchdb:3.5
Credentials resolve most-specific-first: configuration keys (Koan:Data:CouchDb:UserId /
Password), then the official image's own environment convention (COUCHDB_USER /
COUCHDB_PASSWORD — the ones docker run already received), then the development default
admin/password (the same defaults the Testcontainers CouchDB modules and the image
documentation use; CouchDB 3.x refuses to start without an admin user, so an empty default is not
viable). The endpoint and database default to localhost:5984 and koan; the database is created
on first use under managed lifecycle.
A couchdb://user:password@host:port URI is also accepted. Under managed lifecycle policy the
adapter creates each entity's database on first use; under StorageLifecycle: External it never
creates anything and an absent database reports as absent.
Shape
CouchDB has no collections — one entity container resolves to one database under the source's
prefix (Database defaults to koan; Todo lives in koan_todo_<namesuffix>). Container-scoped
partitions resolve to distinct physical databases; database-scoped routing selects the prefix per
source.
What it adds
| Capability | State |
|---|---|
Full scalar filter set + collection operators ($all/$in/$nin/$size, bare element equality) |
declared and store-executed (Mango _find) |
Element-LIKE inside arrays ($like) |
not declared — Mango $regex does not cross array elements; the floor answers it and the query records a runtime fallback fact |
| Sort lowering | not declared — CouchDB gates _find sort on a matching index; only the identity (_id) order is store-side |
| Atomic batch | not declared — _bulk_docs commits per document; item outcomes are complete |
| Provider-bounded paging (streams) | not declared — Mango has no server-side cursor; streaming rejects |
Limits and store notes (learned the hard way)
- Any top-level document member starting with
_is rejected ("Bad special document member"). The framework-managed isolation discriminators (underscore-prefixed by convention) therefore ride in a legalkoansubdocument on write, hoist back on read, and selectors targetkoan.<name>— the row-isolation predicate stays store-enforced. - Writes are MVCC: an update or delete carries the current
_rev(409 without). Upserts read the revision first; a race surfaces as a named conflict, never as a silent overwrite. - JSON
nullfields are stored as nulls, so "exists" compiles to present-and-non-null. - The admin party is disabled in CouchDB 3.x defaults; credentials are required.
The container fixture in the test project wires a working single-node instance; it is the reference.
| 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.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.10)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.10)
- Microsoft.Extensions.Configuration.Json (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Hosting (>= 10.0.10)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Logging (>= 10.0.10)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Logging.Console (>= 10.0.10)
- Microsoft.Extensions.Options (>= 10.0.10)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.10)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.10)
- Newtonsoft.Json (>= 13.0.4)
- Sylin.Koan.Core (>= 1.0.39 && < 2.0.0)
- Sylin.Koan.Data.Abstractions (>= 1.0.41 && < 2.0.0)
- Sylin.Koan.Data.Core (>= 1.0.73 && < 2.0.0)
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 |
|---|---|---|
| 1.0.380 | 109 | 9/13/2026 |
| 1.0.378 | 108 | 9/12/2026 |
| 1.0.376 | 94 | 9/12/2026 |
| 1.0.375 | 96 | 9/10/2026 |
| 1.0.372 | 100 | 9/10/2026 |
| 1.0.369 | 100 | 9/9/2026 |
| 1.0.366 | 93 | 9/9/2026 |
| 1.0.363 | 96 | 9/9/2026 |
| 1.0.359 | 94 | 9/9/2026 |
| 1.0.358 | 106 | 9/9/2026 |
| 1.0.354 | 98 | 9/5/2026 |
| 1.0.353 | 123 | 8/30/2026 |
| 1.0.350 | 99 | 8/30/2026 |