ArrowDb 2.0.0
dotnet add package ArrowDb --version 2.0.0
NuGet\Install-Package ArrowDb -Version 2.0.0
<PackageReference Include="ArrowDb" Version="2.0.0" />
<PackageVersion Include="ArrowDb" Version="2.0.0" />
<PackageReference Include="ArrowDb" />
paket add ArrowDb --version 2.0.0
#r "nuget: ArrowDb, 2.0.0"
#:package ArrowDb@2.0.0
#addin nuget:?package=ArrowDb&version=2.0.0
#tool nuget:?package=ArrowDb&version=2.0.0
ArrowDb
A fast, lightweight, and type-safe key-value database designed for .NET.
- Super-Lightweight (dll size is ~19KB - approximately 9X smaller than UltraLiteDb)
- Ultra-Fast (1,000,000 random operations / ~98ms on M2 MacBook Pro)
- Aggressively Optimized Low-Allocation Persistence
- Thread-Safe and Concurrent
- ACID compliant on transaction level
- Type-Safe (no reflection - compile-time enforced via source-generated
JsonSerializerContext) - Cross-Platform and Fully AOT-compatible
- Super-Easy API near mirroring of
Dictionary<TKey, TValue>
A Note on null Values
ArrowDb enforces a "no nulls" policy by design. Attempting to Upsert a null value will be rejected and return false. This simplifies the developer experience by guaranteeing that if a key exists, its value is never null. This eliminates the need for null-checking after retrieval, leading to cleaner and more predictable application code.
This policy does not affect value types (structs); their default values (e.g., 0 for an int) are considered valid.
Information on usage can be found in the README.
Concurrency note: GetOrAddAsync
GetOrAddAsync is intentionally not atomic. Under concurrency, the factory may be invoked multiple times for the same key, and the final stored value is last-writer-wins (because the value is persisted via Upsert). If you need single-invocation semantics for the factory (e.g. side-effects/expensive work), guard the call site with a keyed lock.
Cancellation support
ArrowDb 2.0 adds optional CancellationToken parameters to its async APIs, including database initialization, SerializeAsync, RollbackAsync, GetOrAddAsync, and the public IDbSerializer contract. Custom serializer implementations should update their method signatures accordingly.
Hosted dependency injection
Hosted DI integration is provided by the companion package ArrowDb.DependencyInjection. That package exposes IArrowDbProvider, the public generic ArrowDbProvider<TSerializer>, and an optional hosted-service primer for eager startup initialization.
Serializer disposal
IDbSerializer now tracks IsDisposed and implements both IDisposable and IAsyncDisposable. ArrowDb.CreateCustom(...) also has an overload that accepts disposeSerializer so serializer ownership can stay with either the database instance or the surrounding host/integration.
File-backed ownership
The built-in file-backed serializers are single-owner writable. If another process already opened the same database path through ArrowDb's built-in file serializer path, the next writable open fails fast with ArrowDbOwnershipException.
The built-in file-backed serializers also perform true async file I/O internally. Custom types inheriting from BaseFileSerializer should implement the async protected override surface.
| Product | Versions 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 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
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on ArrowDb:
| Package | Downloads |
|---|---|
|
ArrowDb.DependencyInjection
Hosted dependency injection support for ArrowDb |
GitHub repositories
This package is not used by any popular GitHub repositories.