gmodel

package
v1.6.5 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Arg

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

type BaseModel

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

处理 model 里面的事务问题

func (*BaseModel) GetSession

func (m *BaseModel) GetSession() *xorm.Session

func (*BaseModel) Init

func (m *BaseModel) Init(opts ...Option)

func (*BaseModel) UpdateById

func (m *BaseModel) UpdateById(id int64, bean interface{}, cols ...string) error

type Option

type Option func(arg *Arg)

func WithCtx

func WithCtx(ctx context.Context) Option

func WithCtxAndSess

func WithCtxAndSess(ctx context.Context, session *xorm.Session) Option

WithCtxAndSess Ctx and Session

func WithDb

func WithDb(db string) Option

func WithSession

func WithSession(session *xorm.Session) Option

Jump to

Keyboard shortcuts

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