sqlx

package
v0.0.0-...-552ec7c Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSql

func NewSql(c *Config) *xorm.Engine

Types

type Config

type Config struct {
	Host        string `yaml:"host"`
	Port        int    `yaml:"port"`
	Database    string `yaml:"database"`
	Username    string `yaml:"username"`
	Password    string `yaml:"password"`
	Driver      string `yaml:"driver"`
	Debug       bool   `yaml:"debug"`
	MaxIdleConn int    `yaml:"maxIdleConn"`
	MaxOpenConn int    `yaml:"maxOpenConn"`
	MaxIdleTime int    `yaml:"maxIdleTime"`
}

func (*Config) Url

func (d *Config) Url() string

type LogCtx

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

func NewLogCtx

func NewLogCtx(l *logrus.Logger) *LogCtx

func (*LogCtx) AfterSQL

func (l *LogCtx) AfterSQL(ctx xormlog.LogContext)

func (*LogCtx) AsyncShowSQL

func (l *LogCtx) AsyncShowSQL(show bool)

func (*LogCtx) BeforeSQL

func (l *LogCtx) BeforeSQL(ctx xormlog.LogContext)

func (*LogCtx) Close

func (l *LogCtx) Close()

func (*LogCtx) Debugf

func (l *LogCtx) Debugf(format string, v ...interface{})

func (*LogCtx) Errorf

func (l *LogCtx) Errorf(format string, v ...interface{})

func (*LogCtx) Infof

func (l *LogCtx) Infof(format string, v ...interface{})

func (*LogCtx) IsShowSQL

func (l *LogCtx) IsShowSQL() bool

func (*LogCtx) Level

func (l *LogCtx) Level() xormlog.LogLevel

func (*LogCtx) SetLevel

func (l *LogCtx) SetLevel(lv xormlog.LogLevel)

func (*LogCtx) ShowSQL

func (l *LogCtx) ShowSQL(show ...bool)

func (*LogCtx) Warnf

func (l *LogCtx) Warnf(format string, v ...interface{})

Jump to

Keyboard shortcuts

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