Documentation ¶
Index ¶
- func NewSql(c *Config) *xorm.Engine
- type Config
- type LogCtx
- func (l *LogCtx) AfterSQL(ctx xormlog.LogContext)
- func (l *LogCtx) AsyncShowSQL(show bool)
- func (l *LogCtx) BeforeSQL(ctx xormlog.LogContext)
- func (l *LogCtx) Close()
- func (l *LogCtx) Debugf(format string, v ...interface{})
- func (l *LogCtx) Errorf(format string, v ...interface{})
- func (l *LogCtx) Infof(format string, v ...interface{})
- func (l *LogCtx) IsShowSQL() bool
- func (l *LogCtx) Level() xormlog.LogLevel
- func (l *LogCtx) SetLevel(lv xormlog.LogLevel)
- func (l *LogCtx) ShowSQL(show ...bool)
- func (l *LogCtx) Warnf(format string, v ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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"` }
type LogCtx ¶
type LogCtx struct {
// contains filtered or unexported fields
}
func (*LogCtx) AfterSQL ¶
func (l *LogCtx) AfterSQL(ctx xormlog.LogContext)
func (*LogCtx) AsyncShowSQL ¶
func (*LogCtx) BeforeSQL ¶
func (l *LogCtx) BeforeSQL(ctx xormlog.LogContext)
Click to show internal directories.
Click to hide internal directories.