Documentation ¶
Index ¶
- func SetTxToCtx(ctx context.Context, tx *gorm.DB) context.Context
- type Model
- type Std
- func (m *Std[T]) Begin() *gorm.DB
- func (m *Std[T]) Create(ctx context.Context, t T) error
- func (m *Std[T]) DB() *gorm.DB
- func (m *Std[T]) Delete(ctx context.Context, t T) *gorm.DB
- func (m *Std[T]) GetTxFromCtx(ctx context.Context) *gorm.DB
- func (m *Std[T]) Init(db *gorm.DB) error
- func (m *Std[T]) List(ctx context.Context) (list []T, err error)
- func (m *Std[T]) SetTxToCtx(ctx context.Context, tx *gorm.DB) context.Context
- func (m *Std[T]) UnscopedList(ctx context.Context) (list []T, err error)
- func (m *Std[T]) Update(ctx context.Context, t T) error
- func (m *Std[T]) UpdateAll(ctx context.Context, t T) error
- func (m *Std[T]) UpdateAllResult(ctx context.Context, t T) *gorm.DB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Model ¶
type Std ¶
type Std[T any] struct { // contains filtered or unexported fields }
func (*Std[T]) SetTxToCtx ¶
func (*Std[T]) UnscopedList ¶
Click to show internal directories.
Click to hide internal directories.