base_mapper

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseMapper

type BaseMapper[T schema.Tabler] struct {
	// contains filtered or unexported fields
}

func NewBaseMapper

func NewBaseMapper[T schema.Tabler](tx *gorm.DB) *BaseMapper[T]

func (*BaseMapper[T]) DeleteBatchIds

func (bm *BaseMapper[T]) DeleteBatchIds(ids any) error

func (*BaseMapper[T]) DeleteById

func (bm *BaseMapper[T]) DeleteById(id any) error

func (*BaseMapper[T]) Insert

func (bm *BaseMapper[T]) Insert(entity *T) error

func (*BaseMapper[T]) InsertBatch

func (bm *BaseMapper[T]) InsertBatch(entities []*T) error

func (*BaseMapper[T]) SelectBatchIds

func (bm *BaseMapper[T]) SelectBatchIds(ids any) ([]*T, error)

func (*BaseMapper[T]) SelectById

func (bm *BaseMapper[T]) SelectById(id any) (*T, error)

func (*BaseMapper[T]) SelectCount

func (bm *BaseMapper[T]) SelectCount(wp wrapper.AbstractQueryWrapper) (int64, error)

func (*BaseMapper[T]) SelectList

func (bm *BaseMapper[T]) SelectList(wp wrapper.AbstractQueryWrapper) ([]*T, error)

func (*BaseMapper[T]) SelectOne

func (bm *BaseMapper[T]) SelectOne(wp wrapper.AbstractQueryWrapper) (*T, error)

func (*BaseMapper[T]) SetBatchSize

func (bm *BaseMapper[T]) SetBatchSize(size int) *BaseMapper[T]

func (*BaseMapper[T]) SetTx

func (bm *BaseMapper[T]) SetTx(tx *gorm.DB) *BaseMapper[T]

func (*BaseMapper[T]) Update

func (bm *BaseMapper[T]) Update(wp wrapper.AbstractUpdateWrapper) error

func (*BaseMapper[T]) UpdateById

func (bm *BaseMapper[T]) UpdateById(entity *T) error

Jump to

Keyboard shortcuts

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