gorm

package
v0.7.16 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(c Config) (*gorm.DB, error)

Types

type Config

type Config struct {
	DSN    string
	Logger Logger
}

type CustomLogger added in v0.7.7

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

func NewCustomLogger added in v0.7.7

func NewCustomLogger(logger *xlogger.Logger) *CustomLogger

func (*CustomLogger) Error added in v0.7.7

func (l *CustomLogger) Error(ctx context.Context, msg string, data ...any)

func (*CustomLogger) Info added in v0.7.7

func (l *CustomLogger) Info(ctx context.Context, msg string, data ...any)

func (*CustomLogger) LogMode added in v0.7.7

func (l *CustomLogger) LogMode(lev logger.LogLevel) logger.Interface

func (*CustomLogger) Trace added in v0.7.7

func (l *CustomLogger) Trace(ctx context.Context, begin time.Time, fc func() (sql string, rowsAffected int64), err error)

func (*CustomLogger) Warn added in v0.7.7

func (l *CustomLogger) Warn(ctx context.Context, msg string, data ...any)

type Logger added in v0.7.7

type Logger = logger.Interface

Jump to

Keyboard shortcuts

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