postgres

package
v0.1.0-alpha.16 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ZIT01 = "ZIT01" // custom error code to express missing permissions by the end-user
)

Variables

This section is empty.

Functions

func DecodeConfig

func DecodeConfig(input any) (database.Dialect, error)

Types

type Config

type Config struct {
	*pgxpool.Config
}

func (Config) Connect

func (p Config) Connect(ctx context.Context) (database.Pool, error)

Connect implements [database.Dialect].

func (Config) Name

func (p Config) Name() string

Name implements [database.Dialect].

type Pool

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

func (*Pool) Close

func (p *Pool) Close(ctx context.Context) error

Close implements [database.Pool].

func (Pool) IsStatements

func (s Pool) IsStatements()

IsStatements implements service.Statements.

func (*Pool) Ping

func (p *Pool) Ping(ctx context.Context) error

Ping implements [database.Pool].

func (*Pool) Statements

func (p *Pool) Statements() service.AllStatements

func (*Pool) Transaction

func (p *Pool) Transaction(ctx context.Context, fn func(ctx context.Context, tx service.Statementer[service.AllStatements]) error) error

Transaction implements [database.Pool].

type PoolConfig

type PoolConfig struct {
	*pgxpool.Pool
}

func (*PoolConfig) Connect

func (p *PoolConfig) Connect(ctx context.Context) (database.Pool, error)

Connect implements [database.Dialect].

func (*PoolConfig) Name

func (p *PoolConfig) Name() string

Name implements [database.Dialect].

Jump to

Keyboard shortcuts

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