postgresql

package
v0.0.0-...-9e87bf8 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ClientTimeout = 5 * time.Second

Variables

This section is empty.

Functions

func NewClient

func NewClient(cfg *pgxpool.Config, MaxConnAttempts int) (*pgxpool.Pool, error)

Types

type Client

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

Jump to

Keyboard shortcuts

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