CSharpDB.ImportExport 4.3.0

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

CSharpDB.ImportExport

Native table archive import/export support for CSharpDB.

CSharpDB.ImportExport provides the shared table archive format used by the execution engine, client API, admin import/export tools, and DevOps comparison features. It is a low-level package for tools that need to read or write CSharpDB table archives directly.

Features

  • native CSharpDB table archive reader and writer
  • schema and manifest metadata models
  • row streaming through IAsyncEnumerable<DbValue[]>
  • primary-key index metadata and indexed integer primary-key lookup
  • conversion between archive schema models and CSharpDB.Primitives.TableSchema

The integer primary-key lookup index is an optional acceleration structure. Writers retain at most 65,536 index entries in memory. Archives with more rows are written without the physical lookup index; their schema and rows are still complete, and external-table point lookups use the streaming scan fallback.

Format v5 archives carry required SHA-256 digests for their schema, rows, and optional physical index. Every reader path verifies those section digests before exposing archive data; v3 and v4 remain readable for compatibility.

The Admin restore workflow adds an independent post-load check before a staged table becomes visible. It compares archive rows with the loaded table using the csharpdb-canon-v1 logical encoding and an order-independent, duplicate-preserving 256-partition checksum. Regenerated rowversion values are explicitly excluded. The target scan and final rename share one transaction, and metadata plus rows are read from one immutable private archive snapshot. A mismatch, validation error, or cancellation before the activation boundary leaves no activated table. Once validation passes, the short rename/commit sequence is intentionally non-cancelable and its result is reconciled if commit reporting fails through a durable activation receipt written in the same transaction. The immutable snapshot and memory-bounded checksum spill workspace each have a configurable 4-GiB default safety limit through CSharpDB.Admin.ImportExport.Services.TableArchiveRestoreOptions; exceeding either limit fails the restore safely. This activation contract currently requires a direct/local CSharpDB transport.

Reading Archives

using CSharpDB.ImportExport.TableArchives;

var metadata = await TableArchiveReader.ReadMetadataAsync("customers.cdbtable");
Console.WriteLine($"{metadata.Manifest.SourceTableName}: {metadata.Manifest.RowCount} rows");

await foreach (var row in TableArchiveReader.ReadRowsAsync("customers.cdbtable"))
{
    Console.WriteLine(row[0]);
}

Writing Archives

using CSharpDB.ImportExport.TableArchives;
using CSharpDB.Primitives;

TableSchema schema = new()
{
    TableName = "customers",
    Columns =
    [
        new ColumnDefinition { Name = "id", Type = DbType.Integer, IsPrimaryKey = true },
        new ColumnDefinition { Name = "name", Type = DbType.Text },
    ],
};

DbValue[][] rows =
[
    [DbValue.Integer(1), DbValue.Text("Ada")],
    [DbValue.Integer(2), DbValue.Text("Grace")],
];

await TableArchiveWriter.WriteAsync(
    "customers.cdbtable",
    schema,
    TableArchiveWriter.ToAsyncRows(rows));

Dependencies

  • CSharpDB.Primitives - shared type system and schema contracts
  • CSharpDB.Storage - record serialization used by native table archives
Package Description
CSharpDB.Execution Query planner and operators that consume archive readers for external tables
CSharpDB.Client Public client API that exposes table archive import/export workflows
CSharpDB Recommended all-in-one package

License

MIT - see LICENSE for details.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on CSharpDB.ImportExport:

Package Downloads
CSharpDB.Execution

Query planner, operator tree, and expression evaluator for the CSharpDB embedded database.

CSharpDB.Client

Unified CSharpDB client SDK with pluggable transports (Direct, HTTP, gRPC, TCP, Named Pipes).

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.3.0 152 7/27/2026
4.2.0 168 7/21/2026
4.1.0 160 7/18/2026
4.0.4 159 7/17/2026
4.0.3 158 7/15/2026
4.0.2 175 7/9/2026
4.0.1 168 7/5/2026
4.0.0 176 6/25/2026
3.9.1 200 6/11/2026