orm

package
v0.2.23 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClickhouse added in v0.2.6

func NewClickhouse(config *Config) *gorm.DB

func NewLogger added in v0.2.8

func NewLogger() logger.Interface

func NewMSSQL added in v0.2.6

func NewMSSQL(config *Config) *gorm.DB

func NewMysql added in v0.2.6

func NewMysql(config *Config) *gorm.DB

Types

type Config added in v0.2.17

type Config struct {
	DSN         string        // write data source name.
	Active      int           // 开启最大连接数
	Idle        int           // 最大闲置连接数
	IdleTimeout time.Duration // 连接空闲时间
	GormConfig  *gorm.Config
	ReadDSN     []string //读库
}

Config database config.

type HookContext

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

type ObsPlugin

type ObsPlugin struct{}

func (*ObsPlugin) Initialize

func (op *ObsPlugin) Initialize(db *gorm.DB) (err error)

func (*ObsPlugin) Name

func (op *ObsPlugin) Name() string

type Writer added in v0.2.8

type Writer struct{}

func (*Writer) Printf added in v0.2.8

func (w *Writer) Printf(format string, args ...interface{})

Jump to

Keyboard shortcuts

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