repository

package
v0.0.0-...-0231498 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGormRepositoryContext

func NewGormRepositoryContext(db *gorm.DB) shared.RepositoryContext

func NewGormTransaction

func NewGormTransaction(db *gorm.DB) shared.TransactionScoper

Types

type GormRepositoryContext

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

GormRepositoryContext GORM 资源库上下文实现

func (*GormRepositoryContext) Begin

func (*GormRepositoryContext) Commit

func (c *GormRepositoryContext) Commit() error

func (*GormRepositoryContext) Instance

func (c *GormRepositoryContext) Instance() shared.DB

func (*GormRepositoryContext) Rollback

func (c *GormRepositoryContext) Rollback() error

type GormTransaction

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

func (*GormTransaction) Scope

func (t *GormTransaction) Scope(fn func(shared.RepositoryContext) error) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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