dump

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package dump produces a portable SQL dump of a local SQLite database — the schema as CREATE statements plus the data as INSERTs — equivalent to the sqlite3 shell's ".dump" command. The output is a standalone .sql file that recreates the database when fed back into sqlite3 (or litescope migrate).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dump

func Dump(path string, w io.Writer, opts Options) error

Dump writes a SQL dump of the database at path to w.

Types

type Options

type Options struct {
	// SchemaOnly emits only DDL (CREATE statements), no INSERTs.
	SchemaOnly bool
	// DataOnly emits only INSERTs, no schema.
	DataOnly bool
	// Table, when non-empty, restricts the dump to a single table (and its data).
	Table string
}

Options controls what the dump includes.

Jump to

Keyboard shortcuts

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