Compze.DbPool 0.12.0-alpha

Prefix Reserved
This is a prerelease version of Compze.DbPool.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Compze.DbPool --version 0.12.0-alpha
                    
NuGet\Install-Package Compze.DbPool -Version 0.12.0-alpha
                    
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="Compze.DbPool" Version="0.12.0-alpha" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Compze.DbPool" Version="0.12.0-alpha" />
                    
Directory.Packages.props
<PackageReference Include="Compze.DbPool" />
                    
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 Compze.DbPool --version 0.12.0-alpha
                    
#r "nuget: Compze.DbPool, 0.12.0-alpha"
                    
#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 Compze.DbPool@0.12.0-alpha
                    
#: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=Compze.DbPool&version=0.12.0-alpha&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Compze.DbPool&version=0.12.0-alpha&prerelease
                    
Install as a Cake Tool

Compze.DbPool

Empty databases on demand for integration testing etc. Supports SQL Server, MySql, PostgreSQL and SQLite (Disk and memory mode)

What's in this package?

This package provides database lifecycle management for integration tests:

  • Database pooling — DbPool manages a pool of test databases, automatically provisioning and cleaning them between tests
Package Description
Compze.Must Fluent assertions
Compze.xUnitMatrix xUnit utilities

License

Apache-2.0

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (10)

Showing the top 5 NuGet packages that depend on Compze.DbPool:

Package Downloads
Compze.DbPool.MicrosoftSql

Empty SQL Server databases on demand for integration testing etc.

Compze.DbPool.MySql

Empty MySQL databases on demand for integration testing etc.

Compze.DbPool.PostgreSql

PostgreSQL database pool support for Compze integration testing.

Compze.DbPool.Sqlite

Discontinued: this is its last version. Compze no longer supports SQLite: it runs one writer at a time, so it could never be a fully supported persistence layer. Use Compze.DbPool.MicrosoftSql, Compze.DbPool.PostgreSql or Compze.DbPool.MySql. Empty SQLite databases on demand for integration testing etc.

Compze.DbPool.ServiceClient

How the PostgreSQL, MySQL and SQL Server providers of Compze.DbPool reserve their databases from a DbPool service on the network. Not for direct use: it has no public API.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.19.0-alpha 0 12/5/2026
0.18.1-alpha 0 12/5/2026
0.18.0-alpha 0 12/5/2026
0.17.1-alpha 0 12/5/2026
0.17.0-alpha 0 12/5/2026
0.16.0-alpha 0 12/5/2026
0.15.1-alpha 0 12/5/2026
0.15.0-alpha 0 12/5/2026
0.14.0-alpha 0 12/5/2026
0.13.0-alpha 7 12/5/2026
0.12.0-alpha 124 12/5/2026
0.11.0-alpha 67 12/5/2026
0.10.0-alpha 115 12/4/2026
0.9.0-alpha 108 12/4/2026
0.8.0-alpha 178 12/3/2026
0.7.0-alpha 152 12/2/2026
0.6.0-alpha 113 12/2/2026
0.5.0-alpha 139 11/29/2026
0.4.0-alpha 178 11/28/2026
0.3.1-alpha 117 11/26/2026
Loading failed

- **Removed `IDbPool.SetLogLevel`: DbPool no longer logs.** Its log of each reservation is gone. What it warned of, a pool never disposed and a SQLite database whose reset failed and was redone, it tells on standard error. A step toward DbPool's own fproj: Compze.DbPool no longer depends on Compze.Internals.Logging, Compze.Internals.SystemCE, Compze.Contracts or Compze.Underscore, only on Compze.Threading and Compze.Threading.Interprocess.
- **A pool never disposed can end the process:** with the AppContext switch `Compze.DbPool.FailFastOnAPoolNeverDisposed` on, as a test project turns it on with `<RuntimeHostConfigurationOption Include="Compze.DbPool.FailFastOnAPoolNeverDisposed" Value="true" />`, a pool that the garbage collector finalizes undisposed ends the process through `Environment.FailFast`, saying where the pool was created. A test run then fails on a pool that a test left undisposed. Without it, the pool is told of on standard error, and the process goes on.
- **Removed the `Compze.DbPool.SystemCE` namespace:** `IStrictlyManagedResource`, `StrictlyManagedResource<T>`, `StrictlyManagedResourceBase<T>` and `StrictlyManagedResources`, which DbPool used for its check of pools never disposed.
- **The BCL's exceptions in place of Compze.Contracts':** a reservation length of zero or less throws an `ArgumentOutOfRangeException`, a disposed pool an `ObjectDisposedException`, and a schema declared after its database was reserved an `InvalidOperationException`.
- **The pool is the interface `IDbPool`,** which each database's package creates, with no dependency injection container: `IDbPool.Sqlite()`, `IDbPool.SqliteMemory()`, `IDbPool.PgSql()`, `IDbPool.MySql()` and `IDbPool.MsSql()`, each taking an optional reservation length. `DeclareSchema` is public. A step toward DbPool's own fproj, with nothing from Compze but the Threading packages.
- **Removed:** `DbPoolRegistrar.DbPool()`, which registered the pool in a container; `TestDatabaseSchemas`, now in Compze.Sql.Testing; and the public types of the SQLite providers' machinery, `IDbPoolSqlLayer`, `DbPoolDatabase` and `DbPoolState`. Compze.DbPool no longer depends on Compze.DependencyInjection.