Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGormRepositoryContext ¶
func NewGormRepositoryContext(db *gorm.DB) domain.RepositoryContext
func NewGormTransaction ¶
func NewGormTransaction(db *gorm.DB) domain.TransactionScoper
Types ¶
type GormRepositoryContext ¶
type GormRepositoryContext struct {
// contains filtered or unexported fields
}
GormRepositoryContext GORM 资源库上下文实现
func (*GormRepositoryContext) Begin ¶
func (c *GormRepositoryContext) Begin() (domain.RepositoryContext, error)
func (*GormRepositoryContext) Commit ¶
func (c *GormRepositoryContext) Commit() error
func (*GormRepositoryContext) Instance ¶
func (c *GormRepositoryContext) Instance() domain.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(domain.RepositoryContext) error) error
Click to show internal directories.
Click to hide internal directories.