database

package
v0.0.0-...-e3494e8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecorateEqualInt

func DecorateEqualInt(tx *gorm.DB, field string, value int) *gorm.DB

func DecorateLike

func DecorateLike(tx *gorm.DB, field, value string) *gorm.DB

func Get

func Get() *gorm.DB

func InitRDBMS

func InitRDBMS(name, source string, active, idle, idleTimeout int) (*gorm.DB, error)

Init database init

Types

type Config

type Config struct {
	DSN         string        // data source name
	Active      int           // pool
	Idle        int           // pool
	IdleTimeout time.Duration // connect max life time
	Debug       bool
}

Jump to

Keyboard shortcuts

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