KVDB 1.0.0

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

KVDB

Overview

KVDB provides an IDb unified interface and implementations for RocksDB, LevelDB, and DBreeze. This makes it easy swap out the underlying store without changing your code, enabling flexibility and reducing vendor lock-in.

Features

  • Unified Interface: Use a single API for different key/value databases.
  • Table Support: Perform operations at the granularity of tables.
  • Iterator Support: Iterate over keys within single tables or across the database.
  • Batch Operations: Perform multiple operations atomically.

Installation

To install the package, use NuGet Package Manager and run:

Install-Package KVDB

Or via the dotnet CLI:

dotnet add package KVDB

Usage

Implementing the IDb interface gives you the following capabilities:

  • Open(string dbPath): Open the database located at the specified path.
  • Get(byte table, byte[] key) and Get(byte[] key): Retrieve values by key, optionally within a specific table.
  • GetIterator(byte table) and GetIterator(): Retrieve iterators to navigate keys.
  • GetWriteBatch(params byte[] tables): Retrieve a batch object to perform multiple write operations atomically.
  • Clear(): Clear all tables and their contents.

Example

using KVDB;
// using KVDB.LevelDb;
// using KVDB.RocksDb;
// using KVDB.DBreezeDb;
//
// OR:

// Implement IDb interface
public class MyDb : IDb
{
  // ... Your implementation here
}

// Usage
IDb myDb = new MyDb(); // or LevelDb or RocksDb or DBreezeDb..
myDb.Open("path/to/db");
byte[] value = myDb.Get(1, new byte[] {0x01});
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  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.
  • net6.0

    • No dependencies.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on KVDB:

Package Downloads
KVDB.DBreezeDb

Used in conjunction with KVDB for standardized KV-store access.

KVDB.LevelDb

Used in conjunction with KVDB for standardized KV-store access.

KVDB.RocksDb

Used in conjunction with KVDB for standardized KV-store access.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 335 10/4/2023