postgres

package
v1.0.0-alpha.24 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: AGPL-3.0 Imports: 42 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) Migrate

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

Migrate implements database.Pool.

func (Pool) NewManagedID

func (s Pool) NewManagedID(prefix string) (string, error)

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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