pgdump

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDump

func GetDump(db *pgengine.DB, additionalParams ...Parameter) (string, error)

GetDump gets the pg_dump of the inputted database. It is only intended to be used for testing. You cannot securely pass passwords with this implementation, so it will only accept databases created for unit tests (spun up with the pgengine package) "pgdump" must be on the system's PATH

func GetDumpUsingBinary

func GetDumpUsingBinary(pgDumpBinaryPath string, db *pgengine.DB, additionalParams ...Parameter) (string, error)

Types

type Parameter

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

Parameter represents a parameter to be pg_dump. Don't use a type alias for a string slice because all parameters for pgdump should be explicitly added here

func WithExcludeSchema

func WithExcludeSchema(pattern string) Parameter

func WithSchemaOnly

func WithSchemaOnly() Parameter

Jump to

Keyboard shortcuts

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