gorms

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DaoBaseTypeID = "06ce4450-161e-44aa-8695-527a97bf57c5"
View Source
const (
	//GormTypeID type id
	GormTypeID = "d2b575cd-e38f-4002-b4bd-9dc85fe13fe6"
)

Variables

This section is empty.

Functions

func DaoBaseTypeLives added in v0.2.1

func DaoBaseTypeLives() []*dot.TypeLives

DaoBaseTypeLives

func GormsConfigTypeLive

func GormsConfigTypeLive() *dot.ConfigTypeLive

GormsConfigTypeLive return config

func GormsTypeLives

func GormsTypeLives() []*dot.TypeLives

GormsTypeLives return type lives

Types

type DaoBase added in v0.2.1

type DaoBase struct {
	Wrapper *Gorms `dot:""`
}

func GenerateDaoBaseByDb added in v0.2.1

func GenerateDaoBaseByDb(db *Gorms) *DaoBase

GenerateDaoBaseByDb this func is for test

func (*DaoBase) WithTx added in v0.2.1

func (c *DaoBase) WithTx(task func(tx *gorm.DB) error) error

WithTx with transaction, if return err != nil then rollback, or commit the transaction

type Gorms

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

func NewGormsTest

func NewGormsTest(dbParameters string, showSQL bool, dialect string) *Gorms

NewGormsTest just for test

func (*Gorms) Create

func (c *Gorms) Create(l dot.Line) (err error)

func (*Gorms) GetDb added in v0.2.1

func (c *Gorms) GetDb() *gorm.DB

Jump to

Keyboard shortcuts

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