database

package
v0.0.0-...-463c1e9 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ExtendedInsertRows = 100
	IgnoreMapPlacement = "ignore"
	NoDataMapPlacement = "nodata"
	FakerUsageCheck    = "faker"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host     string
	Port     string
	Database string
	User     string
	Pass     string
}

func NewConfig

func NewConfig(
	user string,
	pass string,
	host string,
	port string,
	database string,
) Config

func (*Config) ConnectionString

func (c *Config) ConnectionString() string

type MySQL

type MySQL interface {
	Dump(w io.Writer) (err error)
	SetSelectMap(map[string]map[string]string)
	SetWhereMap(map[string]string)
	SetFilterMap(noData []string, ignore []string) error
}

func NewMySQLDumper

func NewMySQLDumper(db *sql.DB, logger *zap.Logger, randomizerService generator.Service, options ...Option) (
	MySQL,
	error,
)

type Option

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

func OptionValue

func OptionValue(key, value string) Option

Jump to

Keyboard shortcuts

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