database

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildURL

func BuildURL(url, dbName, user, pwd string) string

func NewConnection

func NewConnection(
	ctx context.Context,
	url string,
	opts ...OptFunc,
) (
	*pgxpool.Pool,
	error,
)

NewConnection creates a new pooled connection for pgx

Types

type OptFunc added in v1.1.0

type OptFunc func(*pgxpool.Config)

func WithMaxConn added in v1.1.0

func WithMaxConn(maxConn int32) OptFunc

func WithMinConn added in v1.1.0

func WithMinConn(minConn int32) OptFunc

Jump to

Keyboard shortcuts

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