dao

package
v0.0.0-...-6b11828 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const SelectForUpdate = "UPDATE"

Variables

This section is empty.

Functions

func GormWhereEqualWithNotNil

func GormWhereEqualWithNotNil(session *gorm.DB, field string, v any) *gorm.DB

func GormWhereInWithNotEmpty

func GormWhereInWithNotEmpty[T any](session *gorm.DB, field string, s []T) *gorm.DB

func Lock

func Lock(session *gorm.DB, lock bool) *gorm.DB

Types

type BaseDao

type BaseDao struct{}

func New

func New() *BaseDao

func (*BaseDao) BeginTransaction

func (cls *BaseDao) BeginTransaction(ctx context.Context) (transactional.Transactional, error)

func (*BaseDao) GetDb

func (cls *BaseDao) GetDb(ctx context.Context) *gorm.DB

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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