Documentation ¶
Index ¶
- func NewGormRedis[T scache.Table[I], I scache.IDType](prefix, table, idField string, db *gorm.DB, red *redis.Client, ...) *scache.RedisCache[T, I]
- func NewGormRedisFull[T scache.Table[I], I scache.IDType](prefix, table, idField string, db *gorm.DB, red *redis.Client, ...) scache.FullCache[T, I]
- type Gorm
- func (s *Gorm[T, I]) Close() error
- func (s *Gorm[T, I]) Create(r *T) error
- func (s *Gorm[T, I]) DB() *gorm.DB
- func (s *Gorm[T, I]) Delete(ids ...I) (int64, error)
- func (s *Gorm[T, I]) Get(id I) (T, error)
- func (s *Gorm[T, I]) GetBy(index scache.Index) (T, error)
- func (s *Gorm[T, I]) List(ids ...I) ([]T, error)
- func (s *Gorm[T, I]) ListAll() ([]T, error)
- func (s *Gorm[T, I]) ListBy(index scache.Index, initOrders scache.OrderBys) ([]T, error)
- func (s *Gorm[T, I]) ListByUniqueInts(field string, values []int64) ([]T, error)
- func (s *Gorm[T, I]) ListByUniqueStrs(field string, values []string) ([]T, error)
- func (s *Gorm[T, I]) Save(r *T) error
- func (s *Gorm[T, I]) Update(id I, values interface{}) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGormRedis ¶
Types ¶
type Gorm ¶
func (*Gorm[T, I]) ListByUniqueInts ¶
ListIn list objs by index field in values
func (*Gorm[T, I]) ListByUniqueStrs ¶
ListIn list objs by index field in values
Click to show internal directories.
Click to hide internal directories.