export

package
v0.1.0-alpha.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package export handles exporting SRA metadata from the internal database into SRAdb-compatible SQLite database files, with optional gzip compression.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	SourceDB     string
	OutputPath   string
	FTSVersion   int
	BatchSize    int
	ShowProgress bool
	Compress     bool
	Verbose      bool
	Debug        bool
}

Config holds configuration for the export process, including source database path, output path, batch size, and compression settings.

type Exporter

type Exporter struct {
	// contains filtered or unexported fields
}

Exporter copies SRA metadata from a source database into an SRAdb-compatible SQLite file, creating the schema, denormalized tables, and FTS indexes.

func NewExporter

func NewExporter(cfg *Config) (*Exporter, error)

NewExporter creates a new exporter instance

func (*Exporter) Close

func (e *Exporter) Close()

Close releases all database connections and file handles held by the Exporter.

func (*Exporter) Export

func (e *Exporter) Export() (*Stats, error)

Export executes the full export pipeline: creates the target schema, copies all tables, builds the denormalized SRA table and FTS index, then finalizes the output file.

type Stats

type Stats struct {
	Studies     int
	Experiments int
	Samples     int
	Runs        int
	Submissions int
	SRARecords  int
	Duration    time.Duration
}

Stats holds row counts and timing information for a completed export.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL