gorm

package
v0.0.0-...-6ef52c9 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoMigrate

func AutoMigrate(db *gorm.DB, dst ...interface{})

func Close

func Close(db *gorm.DB)

func Connect

func Connect(options *Options) (*gorm.DB, error)

Connect ...

func New

func New[T any](db *query.AppIDB) query.DB[T]

func NewDBTx

func NewDBTx(db *gorm.DB) query.DBTx

func NewDbLogger

func NewDbLogger(l *zap.Logger) logger.Interface

func WithContext

func WithContext(ctx context.Context, db *gorm.DB) *gorm.DB

Types

type Options

type Options struct {
	Host           string
	Port           string
	DBName         string
	User           string
	Password       string
	ConnectTimeout int64
	Logger         *zap.Logger
	PoolOptions    *dbre.DbPoolOptions
	TraceEnable    bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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