Versions in this module Expand all Collapse all v1 v1.1.0 Jan 30, 2024 v1.0.0 Dec 28, 2023 Changes in this version + type Mapper struct + AfterMap2Model func(from any, to *T) *T + BeforeMap2Model func(from any) any + func (m *Mapper[T]) Map2Model(from any) *T + func (m *Mapper[T]) Map2Models(from any) []T + func (m *Mapper[T]) MapModel2Model(from any, to *T) *T + type Repository struct + func (r *Repository[T]) Count(tx *gorm.DB, clause models.IClause) (int64, error) + func (r *Repository[T]) Delete(tx *gorm.DB, entity *T) error + func (r *Repository[T]) DeleteAll(tx *gorm.DB, entities []T) error + func (r *Repository[T]) DeleteBy(tx *gorm.DB, clause models.IClause) error + func (r *Repository[T]) FindAll(tx *gorm.DB, clause models.IClause) ([]T, error) + func (r *Repository[T]) FindAllComplex(tx *gorm.DB, clause models.IClause, page models.IPagination, ...) ([]T, models.IPagination, error) + func (r *Repository[T]) FindByID(tx *gorm.DB, id uint) (*T, error) + func (r *Repository[T]) FindOne(tx *gorm.DB, clause models.IClause) (*T, error) + func (r *Repository[T]) Save(tx *gorm.DB, entity *T) (*T, error) + func (r *Repository[T]) SaveAll(tx *gorm.DB, entities []T) ([]T, error)