Documentation
¶
Index ¶
- type Dao
- func (d *Dao[M]) Clone(db *gorm.DB) *Dao[M]
- func (d *Dao[M]) DeleteManyByIDs(ids []int64) (int64, error)
- func (d *Dao[M]) Find(page, pageSize int) ([]*M, int64, error)
- func (d *Dao[M]) GetManyByIDs(ids []int64) ([]*M, error)
- func (d *Dao[M]) GetOneByID(id int64) (*M, error)
- func (d *Dao[M]) InsertMany(data []*M) error
- func (d *Dao[M]) InsertOne(data *M) error
- func (d *Dao[M]) UpdateByID(id int64, values map[string]any) (int64, error)
- type IDao
- type MODEL
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
func (*Dao[M]) DeleteManyByIDs ¶
DeleteManyByIDs 根据 IDs 批量删除
func (*Dao[M]) GetManyByIDs ¶
GetManyByIDs 根据 IDs 批量查询
type IDao ¶
type IDao[M MODEL] interface { GetOneByID(id int64) (*M, error) GetManyByIDs(ids []int64) ([]*M, error) InsertOne(i *M) error InsertMany(ips []*M) error UpdateByID(id int64, values map[string]any) (int64, error) DeleteManyByIDs(ids []int64) (int64, error) Find(page, pageSize int) ([]*M, int64, error) }
IDao 数据访问层
Click to show internal directories.
Click to hide internal directories.