basedao

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseDao

type BaseDao struct {
	Db        *gorm.DB
	Model     interface{}
	TableName string
}

func NewBaseDao

func NewBaseDao(tableName string, m interface{}) *BaseDao

func (*BaseDao) Begin

func (b *BaseDao) Begin() *BaseDao

func (*BaseDao) Commit

func (b *BaseDao) Commit() *BaseDao

func (*BaseDao) GetsByCond

func (b *BaseDao) GetsByCond(ctx context.Context, cond map[string]interface{}, res interface{}) error

func (*BaseDao) InsertOneRecord

func (b *BaseDao) InsertOneRecord(ctx context.Context) error

func (*BaseDao) Rollback

func (b *BaseDao) Rollback() *BaseDao

func (*BaseDao) SetModel

func (b *BaseDao) SetModel(m interface{}) *BaseDao

Jump to

Keyboard shortcuts

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