pgdump

package
v0.0.0-...-f22f37e Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DumpColumn

type DumpColumn struct {
	Name         string
	Typ          string
	TypOptions   string
	IsNotNull    bool
	IsPrimaryKey bool
	WithDefault  bool
}

type DumpOption

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

func NewDumpOption

func NewDumpOption() DumpOption

func (DumpOption) Do

func (o DumpOption) Do() (*DumpSQL, error)

Do return SQL dump including table definitions from CREATE TABLE statements

func (DumpOption) Validate

func (o DumpOption) Validate() error

func (DumpOption) WithCustomTypes

func (o DumpOption) WithCustomTypes(customTypes []string) DumpOption

func (DumpOption) WithPgConfig

func (o DumpOption) WithPgConfig(ctx context.Context, config PgConfig) DumpOption

func (DumpOption) WithPgDumpPath

func (o DumpOption) WithPgDumpPath(pgDumpPath string) DumpOption

type DumpSQL

type DumpSQL struct {
	Tables *stack.Stack[*DumpTable]
	// contains filtered or unexported fields
}

type DumpTable

type DumpTable struct {
	RawName string
	Name    string
	Schema  string
	Columns stack.Stack[*DumpColumn]
}

type PgConfig

type PgConfig struct {
	Host     string
	Port     string
	User     string
	DBName   string
	Password string
}

Jump to

Keyboard shortcuts

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