scan

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package scan runs a read-only scan of one database. It reads the schema, samples rows, judges every column and meta key, works out how tables link up, and lists what a plain copy would let staging do to real people.

Index

Constants

View Source
const (
	DefaultSampleRows     = 300
	DefaultMetaSampleRows = 3000
	DefaultMaxValueLen    = 4096
)

Defaults for Options.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, sess *dbconn.Session, opts Options) (*model.Result, error)

Run scans the database behind the session.

Types

type Options

type Options struct {
	SampleRows     int  // rows per table
	MetaSampleRows int  // rows per key/value table
	Samples        bool // false judges names only and reads no rows
	Preset         string
	MaxValueLen    int
	Version        string
	Progress       func(done, total int, table string)
}

Options control a scan.

Jump to

Keyboard shortcuts

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