core

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PostgresBigintMin = -9223372036854775808
	PostgresBigintMax = 9223372036854775807
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionCreds

type ConnectionCreds struct {
	Host     string
	Port     int16
	Database string
	Username string
	Password string
	SSL      bool
}

type Manager

type Manager struct {
	OutputFilename *string
	Database       *sql.DB
	Options        *Options
}

func NewManager

func NewManager(outputFile *string, connData *ConnectionCreds, options *Options) (Manager, error)

NewManager creates a new Manager instance with the given output file, database connection credentials, and options. It opens a connection to the database based on the credentials, configuring SSL mode appropriately. Returns a Manager instance and any error from opening the database connection. The returned Manager is ready to perform packaging operations.

func (Manager) Pack

func (m Manager) Pack() error

type Options

type Options struct {
	DataOnly   bool
	Compress   bool
	RecordMode string
}

Options contains configuration options for the packager. DataOnly controls whether to include schema in dump. Compress enables brotli compression on dump file. RecordMode sets the output format for table rows.

Jump to

Keyboard shortcuts

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