Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCtxLogger ¶ added in v1.6.0
func RegisterCtxLogger(ctxLog xormLog.ContextLogger)
Types ¶
type Orm ¶
func (*Orm) Transactional ¶
扩展了一个事务功能
func (*Orm) Upsert ¶ added in v1.5.3
func (o *Orm) Upsert(table interface{}, columns map[string]interface{}, opts ...OrmOption) (sql.Result, error)
添加或者修改的原子操作,但是要求 columns 里面必须包含唯一键,否则会一直执行添加操作 Upsert("table_name",g.Hash{"name":"zhangsan","uuid":"abcdef"}) Upsert("table_name",g.Hash{"name":"zhangsan","uuid":"abcdef"},orm.WithSession(session)) 事务中使用
type OrmArg ¶ added in v1.5.3
func ExtractOption ¶ added in v1.5.3
Click to show internal directories.
Click to hide internal directories.