Documentation ¶
Index ¶
- type GormEntity
- type GormEntityId
- type GormRepository
- type GormRepositoryImpl
- func (r *GormRepositoryImpl[E, ID]) Delete(e E) error
- func (r *GormRepositoryImpl[E, ID]) DeleteAll(e ...E) (int64, error)
- func (r *GormRepositoryImpl[E, ID]) DeleteAllById(id ...ID) (int64, error)
- func (r *GormRepositoryImpl[E, ID]) DeleteById(id ID) error
- func (r *GormRepositoryImpl[E, ID]) FindAllById(id ...ID) (e []E, err error)
- func (r *GormRepositoryImpl[E, ID]) FindById(id ID) (e E, err error)
- func (r *GormRepositoryImpl[E, ID]) Save(e E) error
- func (r *GormRepositoryImpl[E, ID]) SaveAll(e ...E) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GormEntity ¶
type GormEntity[ID GormEntityId] interface { gpa.Entity[ID] TableName() string }
type GormEntityId ¶
type GormRepository ¶
type GormRepository[E GormEntity[ID], ID GormEntityId] interface { gpa.CrudRepository[E, ID] }
func NewGormRepository ¶
func NewGormRepository[E GormEntity[ID], ID GormEntityId](tx *gorm.DB) GormRepository[E, ID]
type GormRepositoryImpl ¶
type GormRepositoryImpl[E GormEntity[ID], ID GormEntityId] struct { // contains filtered or unexported fields }
func NewGormRepositoryImpl ¶
func NewGormRepositoryImpl[E GormEntity[ID], ID GormEntityId](tx *gorm.DB) *GormRepositoryImpl[E, ID]
func (*GormRepositoryImpl[E, ID]) Delete ¶
func (r *GormRepositoryImpl[E, ID]) Delete(e E) error
func (*GormRepositoryImpl[E, ID]) DeleteAll ¶
func (r *GormRepositoryImpl[E, ID]) DeleteAll(e ...E) (int64, error)
func (*GormRepositoryImpl[E, ID]) DeleteAllById ¶
func (r *GormRepositoryImpl[E, ID]) DeleteAllById(id ...ID) (int64, error)
func (*GormRepositoryImpl[E, ID]) DeleteById ¶
func (r *GormRepositoryImpl[E, ID]) DeleteById(id ID) error
func (*GormRepositoryImpl[E, ID]) FindAllById ¶
func (r *GormRepositoryImpl[E, ID]) FindAllById(id ...ID) (e []E, err error)
func (*GormRepositoryImpl[E, ID]) FindById ¶
func (r *GormRepositoryImpl[E, ID]) FindById(id ID) (e E, err error)
func (*GormRepositoryImpl[E, ID]) Save ¶
func (r *GormRepositoryImpl[E, ID]) Save(e E) error
func (*GormRepositoryImpl[E, ID]) SaveAll ¶
func (r *GormRepositoryImpl[E, ID]) SaveAll(e ...E) (int64, error)
Click to show internal directories.
Click to hide internal directories.