postgres

package
v0.0.0-...-4046ec0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gorm

type Gorm struct {
	*gorm.DB
}

func New

func New(connString string, opts ...Option) (*Gorm, error)

func (*Gorm) TxBegin

func (g *Gorm) TxBegin(ctx context.Context) *Gorm

func (*Gorm) WithCtx

func (g *Gorm) WithCtx(ctx context.Context) *Gorm

type Option

type Option func(*config)

func LogLevel

func LogLevel(level string) Option

func MaxIdleConns

func MaxIdleConns(n int) Option

func MaxOpenConns

func MaxOpenConns(n int) Option

func NowFunc

func NowFunc(f func() time.Time) Option

func SilentLogger

func SilentLogger() Option

Jump to

Keyboard shortcuts

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