Winche.Database
1.0.0
See the version list below for details.
dotnet add package Winche.Database --version 1.0.0
NuGet\Install-Package Winche.Database -Version 1.0.0
<PackageReference Include="Winche.Database" Version="1.0.0" />
<PackageVersion Include="Winche.Database" Version="1.0.0" />
<PackageReference Include="Winche.Database" />
paket add Winche.Database --version 1.0.0
#r "nuget: Winche.Database, 1.0.0"
#:package Winche.Database@1.0.0
#addin nuget:?package=Winche.Database&version=1.0.0
#tool nuget:?package=Winche.Database&version=1.0.0
Winche.Database
A JSON document database layer built on top of PostgreSQL. Store, query, and subscribe to JSON documents using a structured query language — with PostgreSQL as the storage backend via JSONB.
Supports real-time subscriptions, ACID transactions, aggregation pipelines, and integrates with Winche.Sentinel for access control.
Install
dotnet add package Winche.Database
Add the REST or WebSocket API integrations as needed:
dotnet add package Winche.Database.AspNetCore.Rest
dotnet add package Winche.Database.AspNetCore.WebSockets
Quick Start
1. Configure appsettings.json
{
"WincheDatabase": {
"Schema": "public",
"TableName": "documents",
"TransactionConfig": {
"TotalTimeoutSpan": "00:05:00",
"IdleTimeoutSpan": "00:05:00",
"CleanupInterval": "00:00:01"
}
}
}
2. Register services
builder.Services.AddWincheDatabase(connectionString, builder.Configuration);
// Add REST API (optional)
builder.Services.AddWincheDatabaseRestApi();
// Add WebSocket API (optional)
builder.Services.AddWincheDatabaseWsApi();
3. Initialize schema and map endpoints
// Ensures the documents table and indexes exist
app.UseWincheDatabase();
// Map REST routes (default prefix: "documents")
app.UseWincheDatabaseRestApi();
// Map WebSocket route (connects at /documents/ws)
app.UseWincheDatabaseWsApi();
See samples/WebApi for a complete working example.
Features
- Document storage — Store arbitrary JSON documents with automatic metadata (id, version, timestamps)
- Querying — Filter with 19+ conditional operators, sort, limit, offset, and cursor-based pagination
- Real-time subscriptions — Subscribe to queries and receive live updates over WebSocket when documents change
- Transactions — ACID transactions with commit/rollback, idle timeout, and automatic cleanup
- Aggregation pipelines — MongoDB-style pipeline stages:
match,lookup,unwind,group,project,sort,limit,skip - Batch operations — Atomic commit of multiple operations in a single request
- Sync mutations — Conflict-free document mutations (
Set,Update,Delete) via mutation batches - Access control — Document-level access rules via Winche.Sentinel integration
- PostgreSQL backend — All data stored as JSONB; queries translated to native PostgreSQL SQL
Packages
| Package | Description |
|---|---|
Winche.Database |
Core document store: schema, CRUD, queries, transactions, subscriptions |
Winche.Database.AspNetCore.Rest |
ASP.NET Core REST endpoints |
Winche.Database.AspNetCore.WebSockets |
ASP.NET Core WebSocket protocol and real-time event dispatch |
Requirements
- .NET 10.0
- PostgreSQL (any recent version with JSONB support)
License
Elastic License 2.0
| 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.Hosting.Abstractions (>= 10.0.5)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.6)
- Npgsql (>= 10.0.2)
- Npgsql.DependencyInjection (>= 10.0.2)
- Winche.Sentinel (>= 1.1.0)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Winche.Database:
| Package | Downloads |
|---|---|
|
Winche.Database.AspNetCore
A JSON document database layer built on top of PostgreSQL. Store, query, and subscribe to JSON documents — with PostgreSQL as the storage backend via JSONB. |
|
|
Winche.Database.AspNetCore.Rest
A JSON document database layer built on top of PostgreSQL. Store, query, and subscribe to JSON documents — with PostgreSQL as the storage backend via JSONB. |
|
|
Winche.Database.AspNetCore.WebSockets
A JSON document database layer built on top of PostgreSQL. Store, query, and subscribe to JSON documents — with PostgreSQL as the storage backend via JSONB. |
|
|
Winche.Console
An embeddable admin console for Winche.Database and Winche.Storage. Drop it into your ASP.NET Core app to browse and edit JSON documents and manage stored files through a web UI, with its own authentication and role-based access. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.0 | 262 | 7/5/2026 |
| 9.1.0 | 164 | 6/30/2026 |
| 9.0.0 | 162 | 6/28/2026 |
| 8.4.0 | 228 | 6/24/2026 |
| 8.3.0 | 196 | 6/21/2026 |
| 8.2.0 | 170 | 6/20/2026 |
| 8.1.0 | 227 | 6/17/2026 |
| 8.0.0 | 164 | 6/16/2026 |
| 7.0.0 | 163 | 6/15/2026 |
| 6.0.0 | 167 | 6/10/2026 |
| 5.2.0 | 170 | 6/9/2026 |
| 5.1.0 | 170 | 6/8/2026 |
| 5.0.0 | 168 | 6/8/2026 |
| 4.0.0 | 174 | 6/8/2026 |
| 3.0.0 | 179 | 6/7/2026 |
| 2.0.1 | 181 | 5/27/2026 |
| 2.0.0 | 159 | 5/27/2026 |
| 1.0.0 | 155 | 5/25/2026 |