postgres

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Postgres)

func ConnAttempts

func ConnAttempts(attempts int) Option

func ConnTimeout

func ConnTimeout(timeout time.Duration) Option

func MaxPoolSize

func MaxPoolSize(size int) Option

type Postgres

type Postgres struct {
	Builder squirrel.StatementBuilderType
	Pool    *pgxpool.Pool
	// contains filtered or unexported fields
}

func New

func New(url string, opts ...Option) (*Postgres, error)

func (*Postgres) Close

func (p *Postgres) Close()

Close closes all connections in the pool.

Jump to

Keyboard shortcuts

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