Documentation ¶
Index ¶
- type GormModel
- type GormRepository
- type Specification
- func And(specifications ...Specification) Specification
- func Equal[T any](field string, value T) Specification
- func GreaterOrEqual[T comparable](field string, value T) Specification
- func GreaterThan[T comparable](field string, value T) Specification
- func IsNull(field string) Specification
- func LessOrEqual[T comparable](field string, value T) Specification
- func LessThan[T comparable](field string, value T) Specification
- func Not(specification Specification) Specification
- func Or(specifications ...Specification) Specification
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GormRepository ¶
func NewRepository ¶
func NewRepository[M GormModel[E], E any](db *gorm.DB) *GormRepository[M, E]
func (*GormRepository[M, E]) Find ¶
func (r *GormRepository[M, E]) Find(ctx context.Context, specification Specification) ([]E, error)
type Specification ¶
func And ¶
func And(specifications ...Specification) Specification
func Equal ¶
func Equal[T any](field string, value T) Specification
func GreaterOrEqual ¶
func GreaterOrEqual[T comparable](field string, value T) Specification
func GreaterThan ¶
func GreaterThan[T comparable](field string, value T) Specification
func IsNull ¶
func IsNull(field string) Specification
func LessOrEqual ¶
func LessOrEqual[T comparable](field string, value T) Specification
func LessThan ¶
func LessThan[T comparable](field string, value T) Specification
func Not ¶
func Not(specification Specification) Specification
func Or ¶
func Or(specifications ...Specification) Specification
Click to show internal directories.
Click to hide internal directories.