Compendium.Adapters.PostgreSQL 1.0.0

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

compendium-adapter-postgresql

PostgreSQL adapter for the Compendium event-sourcing framework. JSONB-backed event store + projection checkpoint store + streaming event store + saga process-manager repository, all on raw Npgsql.

Extracted from sassy-solutions/compendium per ADR-0006 (multi-repo adapter split). Built from template-compendium-adapter-dotnet.

What's in this package

Component Implements Purpose
PostgreSqlEventStore IEventStore Durable event storage with optimistic concurrency, tenant isolation, JSONB payload
PostgreSqlStreamingEventStore IStreamingEventStore Global-position cursor for projection rebuilds + live processing
PostgreSqlProjectionStore IProjectionStore Projection checkpoints + snapshots + state
PostgreSqlProjectionCheckpointStore IProjectionCheckpointStore Fine-grained per-(projection, aggregate) checkpoints
PostgresProcessManagerRepository IProcessManagerRepository Durable saga state with typed-state reload
RowLevelSecurityExtensions SQL-injection-safe tenant filter construction

Install

dotnet add package Compendium.Adapters.PostgreSQL
services.AddPostgreSqlEventStore(builder.Configuration.GetSection("Postgres"));

See docs/README.md for full configuration (connection string, schema name, table name, BatchSize, multi-tenancy).

Versioning

This package continues the version sequence of Compendium.Adapters.PostgreSQL originally published from the framework monorepo (last framework-published version: 1.0.0-preview.8). The first release from this repo is v1.0.0-preview.9. Versions are driven by git tags via MinVer — see docs/RELEASE.md.

Repository conventions

Aspect Choice
Target .NET 9, C# 13
DB driver Npgsql 9.0.x + Dapper 2.1.x
Test framework xUnit 2.9.3 + FluentAssertions 6.12.1 + NSubstitute 5.1.0
Integration tests Testcontainers 4.11.0 (Docker required)
Coverage gate 199 unit tests, 90 %+ line coverage on the unit-testable surface
Result pattern Result<T> from Compendium.Core

Build & test locally

# Unit tests — no Docker required.
dotnet test --filter "FullyQualifiedName!~IntegrationTests"

# Integration tests — Docker must be running (TestContainers spins up PostgreSQL).
dotnet test --filter "FullyQualifiedName~IntegrationTests"

The integration suite covers PG-specific behaviour that can't be tested against an in-memory implementation: JSONB serialisation round-trip, schema bootstrap, WHERE global_position > @x cursor semantics, tenant-filter SQL injection, snapshot UPSERT, process-manager state-row updates.

License

MIT — Copyright © 2026 Sassy Solutions.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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 was computed.  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
1.0.0 67 5/14/2026
1.0.0-preview.9 512 5/14/2026
1.0.0-preview.8 984 5/2/2026
1.0.0-preview.7 44 5/2/2026
1.0.0-preview.6 83 5/2/2026
1.0.0-preview.5 79 4/30/2026
1.0.0-preview.4 169 4/26/2026
1.0.0-preview.3 55 4/26/2026
1.0.0-preview.2 59 4/25/2026
1.0.0-preview.1 157 4/24/2026