orm

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	*logrus.Entry
	// contains filtered or unexported fields
}

func (*Logger) IsShowSQL

func (l *Logger) IsShowSQL() bool

func (*Logger) Level

func (l *Logger) Level() core.LogLevel

func (*Logger) SetLevel

func (l *Logger) SetLevel(c core.LogLevel)

func (*Logger) ShowSQL

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

type Orm

type Orm struct {
	*xorm.Engine
}

func Ins

func Ins(id ...string) *Orm

返回 orm 组件单例

func (*Orm) Transactional

func (orm *Orm) Transactional(f func(session *xorm.Session) error) (err error)

扩展了一个事务功能

Jump to

Keyboard shortcuts

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