Path: redb/redb.Export/Models/ExportHeader.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Export/Models/ExportHeader.cs
----
namespace redb.Export.Models;
///
/// Represents the header record of a .redb export file.
/// The header is always the first line written to the JSONL stream
/// and carries metadata about the export (provider, timestamp, filters).
///
public sealed class ExportHeader
{
/// Record type discriminator. Always "header".
public string Type => "header";
/// Format version of the export file (currently "1.0").
public string Version { get; init; } = "1.0";
/// Database provider name that produced the export (e.g. "postgres", "mssql").
public string Provider { get; init; } = "";
/// UTC timestamp when the export was started.
public DateTime ExportedAt { get; init; } = DateTime.UtcNow;
///
/// Schema version of the source database the export checked before reading it: the redb module version on
/// PostgreSQL and SQL Server (e.g. "0.7.33"), the file schema version on SQLite (e.g. "17").
/// null in a file written by an earlier version, which did not record it; the import does not require it.
///
public string? SourceSchema { get; init; }
///
/// Scheme identifiers that were exported.
/// An empty array means all schemes were included.
///
public long[] SchemeIds { get; init; } = [];
/// Optional human-readable description of the export.
public string? Description { get; init; }
}