postgreswrapper

package
v1.1.3-beta Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2025 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanUp

func CleanUp(t testing.TB, wrapper Wrapper)

func CleanUpBookEvents

func CleanUpBookEvents(wrapper Wrapper, bookID uuid.UUID) (rowsAffected int64, err error)

func GetGreatestOccurredAtTimeFromDB

func GetGreatestOccurredAtTimeFromDB(t testing.TB, wrapper Wrapper) time.Time

func GetLatestBookIDFromDB

func GetLatestBookIDFromDB(t testing.TB, wrapper Wrapper) uuid.UUID

func GuardThatThereAreEnoughFixtureEventsInStore

func GuardThatThereAreEnoughFixtureEventsInStore(wrapper Wrapper, expectedNumEvents int)

func OptimizeDBWhileBenchmarking

func OptimizeDBWhileBenchmarking(wrapper Wrapper) error

func TryCreateEventStoreWithTableName

func TryCreateEventStoreWithTableName(t testing.TB, options ...Option) error

Types

type PGXPoolWrapper

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

PGXPoolWrapper wraps pgxpool-based testing

func (*PGXPoolWrapper) Close

func (e *PGXPoolWrapper) Close()

func (*PGXPoolWrapper) GetEventStore

func (e *PGXPoolWrapper) GetEventStore() EventStore

type SQLDBWrapper

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

SQLDBWrapper wraps sql.DB-based testing

func (*SQLDBWrapper) Close

func (e *SQLDBWrapper) Close()

func (*SQLDBWrapper) GetEventStore

func (e *SQLDBWrapper) GetEventStore() EventStore

type SQLXWrapper

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

SQLXWrapper wraps sqlx.DB-based testing

func (*SQLXWrapper) Close

func (e *SQLXWrapper) Close()

func (*SQLXWrapper) GetEventStore

func (e *SQLXWrapper) GetEventStore() EventStore

type Wrapper

type Wrapper interface {
	GetEventStore() EventStore
	Close()
}

Wrapper interface to abstract over different engine types

func CreateWrapperWithBenchmarkConfig

func CreateWrapperWithBenchmarkConfig(t testing.TB) Wrapper

func CreateWrapperWithTestConfig

func CreateWrapperWithTestConfig(t testing.TB, options ...Option) Wrapper

Jump to

Keyboard shortcuts

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