Documentation ¶
Index ¶
- func Columns(v any) []string
- func ColumnsNotNil(v any) ([]string, int, []any)
- func TableName(v any) string
- type Mapper
- func (m Mapper[T]) DeleteById(id any) error
- func (m Mapper[T]) Get(t T) (T, error)
- func (m Mapper[T]) GetById(id any) (T, error)
- func (m Mapper[T]) GetDb() *gorm.DB
- func (m Mapper[T]) Insert(t T) error
- func (m Mapper[T]) List() ([]T, error)
- func (m Mapper[T]) ListByCondition(t T) ([]T, error)
- func (m Mapper[T]) Page(page Page) ([]T, int64, error)
- func (m Mapper[T]) PageByCondition(t T, page Page) ([]T, int64, error)
- func (m *Mapper[T]) SetDb(db *gorm.DB)
- func (m Mapper[T]) UpdateById(t T) error
- type Page
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mapper ¶
type Mapper[T any] struct { // contains filtered or unexported fields }
func (Mapper[T]) DeleteById ¶
func (Mapper[T]) ListByCondition ¶
func (Mapper[T]) PageByCondition ¶
func (Mapper[T]) UpdateById ¶
Click to show internal directories.
Click to hide internal directories.