mysqldb

package
v1.13.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GormConnect

func GormConnect(params GormConnParams) *gorm.DB

Connect to a MySQL instance using Gorm

func IsRecordNotFoundError added in v1.6.0

func IsRecordNotFoundError(err error) bool

Check if returned error is a "Record not found" error

Types

type ConnectionParams

type ConnectionParams struct {
	DSN               string
	DefaultStringSize uint
	Identifier        string
	ConnMaxLifetime   time.Duration
	MaxOpenConns      int
	MaxIdleConns      int
	ParseTime         bool
}

type GormConnParams

type GormConnParams struct {
	ConnectionParams ConnectionParams
	Log              *logrus.Logger
	GormLoggerConfig *gormLogger.Config
}

Jump to

Keyboard shortcuts

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