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 DefaultKeySampleRows = 20 DefaultMaxValueLen = 4096 )
Defaults for Options.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
SampleRows int // rows per table
MetaSampleRows int // rows per key/value table too big to read whole
KeySampleRows int // rows per key of a key/value table
Samples bool // false judges names only and reads no rows
// SampleKeysOnly reads every key/value table by sampling, as for tables
// too large to list their keys: a window of rows plus probes for the
// keys presets know.
SampleKeysOnly bool
Preset string
MaxValueLen int
Version string
Progress func(done, total int, table string)
}
Options control a scan.
Click to show internal directories.
Click to hide internal directories.