pgx

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PGX

type PGX struct {
	Pool PGXPool
}

func NewPGXHandler

func NewPGXHandler(ctx context.Context, cfg *config.Config) (*PGX, error)

type PGXPool

type PGXPool interface {
	Begin(ctx context.Context) (pgx.Tx, error)
	Ping(ctx context.Context) error
	QueryRow(ctx context.Context, sql string, args ...interface{}) pgx.Row
	Query(ctx context.Context, sql string, args ...interface{}) (pgx.Rows, error)
	Exec(ctx context.Context, sql string, arguments ...interface{}) (pgconn.CommandTag, error)
	Close()
}

PGXPool interface is abstraction of pgxpool package

type PGXRow added in v0.10.0

type PGXRow interface {
	pgx.Row
}

PGXRow interface to mock pgx.Row for adding tests to repository layer

type PGXRows added in v0.10.0

type PGXRows interface {
	pgx.Rows
}

PGXRows interface to mock pgx.Rows for adding tests to repository layer

type PGXTransaction added in v0.11.0

type PGXTransaction interface {
	pgx.Tx
}

PGXTransaction interface to mock pgx.Tx for adding tests to repository layer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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