pgrecipe

package
v0.0.0-rc6 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ManagedConnection

func ManagedConnection(opts ...RecipeOption) *connection.ConnectionPG

func PgCreateDatabase

func PgCreateDatabase(t *testing.T, psqlExecutable []string, connString string, database, owner string)

func PgDropDatabase

func PgDropDatabase(t *testing.T, psqlExecutable []string, connString string, database string)

func PgDump

func PgDump(t *testing.T, pgDumpExecutable []string, psqlExecutable []string, connString string, tableLikePattern string) string

PgDump dumps all tables in the PostgreSQL database specified in the connString. Use the specified pgDumpExecutable for dumping schemas, and the given psqlExecutable for dumping table data. You can specify tableLikePattern to filter tables in the dump, for example, 'public.my%table'

func PostgresContainer

func PostgresContainer(opts ...ContainerOption) (*tc_postgres.PostgresContainer, error)

func RecipeSource

func RecipeSource(opts ...RecipeOption) *postgres.PgSource

func RecipeTarget

func RecipeTarget(opts ...RecipeOption) *postgres.PgDestination

Types

type ContainerOption

type ContainerOption func(opt *ContainerParams)

type ContainerParams

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

type RecipeOption

type RecipeOption func(pg *RecipeParams)

func WithConnection

func WithConnection(connID string) RecipeOption

func WithDBTables

func WithDBTables(tables ...string) RecipeOption

func WithEdit

func WithEdit(f func(pg *postgres.PgSource)) RecipeOption

func WithFiles

func WithFiles(files ...string) RecipeOption

func WithInitDir

func WithInitDir(dir string) RecipeOption

func WithInitFiles

func WithInitFiles(files ...string) RecipeOption

func WithPrefix

func WithPrefix(prefix string) RecipeOption

func WithoutPgDump

func WithoutPgDump() RecipeOption

type RecipeParams

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

Jump to

Keyboard shortcuts

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