Documentation ¶
Index ¶
- Constants
- func ConvXLogLv(lv ELogLevel) core.LogLevel
- type GConfig
- type GormLogger
- type NsqLogger
- type XormLogger
- func (this *XormLogger) Debug(v ...interface{})
- func (this *XormLogger) Debugf(format string, v ...interface{})
- func (this *XormLogger) Error(v ...interface{})
- func (this *XormLogger) Errorf(format string, v ...interface{})
- func (this *XormLogger) Info(v ...interface{})
- func (this *XormLogger) Infof(format string, v ...interface{})
- func (this *XormLogger) IsShowSQL() bool
- func (this *XormLogger) Level() core.LogLevel
- func (this *XormLogger) SetLevel(l core.LogLevel)
- func (this *XormLogger) ShowSQL(show ...bool)
- func (this *XormLogger) Warn(v ...interface{})
- func (this *XormLogger) Warnf(format string, v ...interface{})
Constants ¶
View Source
const ( DEF_START_EXLE_CONNS = 10 DEF_MAX_OPEN_CONNS = 20 DEF_MAX_LIFE_TIME = 0 DEF_DRIVER_SQLITE = "sqlite3" DEF_DRIVER_MYSQL = "mysql" DEF_DRIVER_MSSQL = "mssql" DEF_DRIVER_POSTGRES = "postgres" )
Xorm 快速入门:
// 一共四种特殊字段
type TestTable struct { Id int64 // 默认具备主键自增属性 TheId int64 `xorm:"int(10) pk not null autoincr 'member_id'"` // 标签主键用法 CreatedAt int64 `xorm:"created"` UpdatedAt time.Time `xorm:"updated"` DeletedAt time.Time `xorm:"deleted"` Version int `xorm:"version"` }
Variables ¶
This section is empty.
Functions ¶
func ConvXLogLv ¶
Types ¶
type GConfig ¶
type GConfig struct { Drive string Source string MaxIdle int MaxOpen int MaxLifeTime int // second }
func NewGConfig ¶
type GormLogger ¶
type GormLogger struct{}
------------------------------------------------------------------------------ ================================GormLogger==================================== ------------------------------------------------------------------------------
type XormLogger ¶
type XormLogger struct { // contains filtered or unexported fields } //
------------------------------------------------------------------------------ ================================XormLogger==================================== ------------------------------------------------------------------------------
func (*XormLogger) Debug ¶
func (this *XormLogger) Debug(v ...interface{})
func (*XormLogger) Debugf ¶
func (this *XormLogger) Debugf(format string, v ...interface{})
func (*XormLogger) Error ¶
func (this *XormLogger) Error(v ...interface{})
func (*XormLogger) Errorf ¶
func (this *XormLogger) Errorf(format string, v ...interface{})
func (*XormLogger) Info ¶
func (this *XormLogger) Info(v ...interface{})
func (*XormLogger) Infof ¶
func (this *XormLogger) Infof(format string, v ...interface{})
func (*XormLogger) IsShowSQL ¶
func (this *XormLogger) IsShowSQL() bool
func (*XormLogger) Level ¶
func (this *XormLogger) Level() core.LogLevel
func (*XormLogger) SetLevel ¶
func (this *XormLogger) SetLevel(l core.LogLevel)
func (*XormLogger) ShowSQL ¶
func (this *XormLogger) ShowSQL(show ...bool)
func (*XormLogger) Warn ¶
func (this *XormLogger) Warn(v ...interface{})
func (*XormLogger) Warnf ¶
func (this *XormLogger) Warnf(format string, v ...interface{})
Click to show internal directories.
Click to hide internal directories.