pgclient

package
v0.0.0-...-e92e447 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseRowTo

func ParseRowTo[T any](ctx context.Context, rows pgx.Rows) (*T, error)

func ParseRowsTo

func ParseRowsTo[T any](ctx context.Context, rows pgx.Rows) ([]*T, error)

Types

type PGClient

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

func NewClient

func NewClient(ctx context.Context, config PGClientConfig) (*PGClient, error)

func (*PGClient) Close

func (pgc *PGClient) Close()

func (*PGClient) GetConnection

func (pgc *PGClient) GetConnection(ctx context.Context) (*pgxpool.Conn, error)

type PGClientConfig

type PGClientConfig struct {
	Host   string
	Port   uint16
	User   string
	Pass   string
	DBName string
}

Jump to

Keyboard shortcuts

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