mis

package
v0.0.0-...-d73eb14 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

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

func ConvXLogLv(lv ELogLevel) core.LogLevel

Types

type GConfig

type GConfig struct {
	Drive       string
	Source      string
	MaxIdle     int
	MaxOpen     int
	MaxLifeTime int // second
}

func NewGConfig

func NewGConfig(driver string) *GConfig

type GormLogger

type GormLogger struct{}

------------------------------------------------------------------------------ ================================GormLogger==================================== ------------------------------------------------------------------------------

func (GormLogger) Print

func (l GormLogger) Print(values ...interface{})

Print format & print log

type NsqLogger

type NsqLogger struct{}

func (NsqLogger) Output

func (l NsqLogger) Output(calldepth int, s string) error

Print format & print log

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{})

Jump to

Keyboard shortcuts

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