pgdump

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpData

func DumpData(ctx context.Context, conn *pgx.Conn, out io.Writer, skip []string) error

Types

type Column added in v0.31.0

type Column struct {
	Name         string
	Type         string
	NotNull      bool
	DefaultValue string
}

func (Column) String added in v0.31.0

func (c Column) String() string

type Constraint added in v0.31.0

type Constraint struct {
	Name string
	Def  string
}

func (Constraint) String added in v0.31.0

func (c Constraint) String() string

type Enum added in v0.31.0

type Enum struct {
	Name   string
	Values []string
}

func (Enum) String added in v0.31.0

func (e Enum) String() string

type Extension added in v0.31.0

type Extension struct {
	Name string
}

func (Extension) String added in v0.31.0

func (e Extension) String() string

type Function added in v0.31.0

type Function struct {
	Name string
	Def  string
}

func (Function) String added in v0.31.0

func (f Function) String() string

type Index added in v0.31.0

type Index struct {
	Name string
	Def  string
}

func (Index) String added in v0.31.0

func (idx Index) String() string

type Schema added in v0.31.0

type Schema struct {
	Extensions []Extension
	Functions  []Function
	Tables     []Table
	Enums      []Enum
	Sequences  []Sequence
}

func DumpSchema added in v0.31.0

func DumpSchema(ctx context.Context, conn *pgx.Conn) (*Schema, error)

func (Schema) String added in v0.31.0

func (s Schema) String() string

type Sequence added in v0.31.0

type Sequence struct {
	Name       string
	StartValue int64
	Increment  int64
	MinValue   int64
	MaxValue   int64
	Cache      int64

	OwnedBy string
}

func (Sequence) String added in v0.31.0

func (s Sequence) String() string

type Table added in v0.31.0

type Table struct {
	Name string

	Columns     []Column
	Constraints []Constraint
	Indexes     []Index
	Triggers    []Trigger
	Sequences   []Sequence
}

func (Table) String added in v0.31.0

func (t Table) String() string

type Trigger added in v0.31.0

type Trigger struct {
	Name string
	Def  string
}

func (Trigger) String added in v0.31.0

func (t Trigger) String() string

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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