gorm

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	IgnoreRecordNotFoundError bool
	SlowThreshold             time.Duration
	// contains filtered or unexported fields
}

func (Logger) Error

func (gl Logger) Error(_ context.Context, s string, i ...interface{})

func (Logger) Info

func (gl Logger) Info(_ context.Context, s string, i ...interface{})

func (Logger) LogMode

func (gl Logger) LogMode(level gormLogger.LogLevel) gormLogger.Interface

func (Logger) Trace

func (gl Logger) Trace(_ context.Context, begin time.Time, fc func() (string, int64), err error)

func (Logger) Warn

func (gl Logger) Warn(_ context.Context, s string, i ...interface{})

type MySQLDialector

type MySQLDialector struct {
	mysql.Dialector
}

func (MySQLDialector) Explain

func (x MySQLDialector) Explain(sql string, vars ...interface{}) string

type Repository

type Repository struct {
	*gorm.DB
}

func New added in v1.2.0

func New(config *repository.Config, dbLogger logger.Logger) (*Repository, error)

func (*Repository) Ctx

func (r *Repository) Ctx(ctx context.Context) *Repository

func (*Repository) ToCtx

func (r *Repository) ToCtx(ctx context.Context, connection interface{}) context.Context

Jump to

Keyboard shortcuts

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