types

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2025 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupOptions

type BackupOptions struct {
	Compress   bool
	BatchSize  int // Default: 5000
	MaxWorkers int // Concurrent tables (default: 5)
	Exclude    []string
	Logger     *slog.Logger
	SQLPool    sql.DBStats
}

BackupOptions with performance tunables.

type Dumper

type Dumper interface {
	ListTables(ctx context.Context) ([]string, error)
	DumpSchema(ctx context.Context, table string) (string, error)                // CREATE TABLE string
	DumpData(ctx context.Context, table string, batchSize int) ([]string, error) // Batched INSERT/JSON strings
	Close() error
}

Dumper defines the interface for database-specific dumping.

type Writer

type Writer interface {
	WriteHeader(dbType string) error
	WriteSchema(table, schema string) error
	WriteData(table string, data []string) error // Batched data lines
	Flush() error
}

Writer defines an extensible output writer (e.g., SQL, JSON).

Jump to

Keyboard shortcuts

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