postgresql

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 19, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDatabase

func CreateDatabase(ctx context.Context, log *log.Logger, cfg *config.DBCfg)

func DropDatabase

func DropDatabase(ctx context.Context, log *zap.Logger, cfg *config.DBCfg)

func Migrate

func Migrate(logger *log.Logger, fs *embed.FS, cfg *config.DBCfg) error

func ReplaceDbName

func ReplaceDbName(dbUrl, dbName string) string

Types

type QBuilder

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

func New

func New(log *log.Logger, cfg *config.DBCfg, lc fx.Lifecycle) *QBuilder

func (QBuilder) ConnString

func (qb QBuilder) ConnString() string

func (QBuilder) Querier

func (qb QBuilder) Querier() *pgxpool.Pool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳