pgtest

package
v0.0.0-...-765d1ad Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CleanupFunc

type CleanupFunc func()

CleanupFunc deletes the schema and all database objects.

func NewPostgresSchema

func NewPostgresSchema(t *testing.T, sqlFiles []string, opts ...Option) (*pgx.Conn, CleanupFunc)

NewPostgresSchema opens a connection with search_path set to a randomly named, new schema and loads all sqlFiles.

func NewPostgresSchemaString

func NewPostgresSchemaString(t *testing.T, sql string, opts ...Option) (*pgx.Conn, CleanupFunc)

NewPostgresSchema opens a connection with search_path set to a randomly named, new schema and loads the sql string.

type Option

type Option func(config *pgx.ConnConfig)

Jump to

Keyboard shortcuts

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