Documentation ¶
Index ¶
- type Finder
- func (f *Finder) SetIgnoreNotFound(ignoreNotFound bool) *Finder
- func (f *Finder) SetModel(model interface{}) *Finder
- func (f *Finder) SetOrderBy(orderBy string) *Finder
- func (f *Finder) SetPaginate(num, size int, total *int64) *Finder
- func (f *Finder) SetPreloads(preloads ...string) *Finder
- func (f *Finder) SetRecipient(recipient interface{}) *Finder
- func (f *Finder) SetScope(scopes ...func(db *gorm.DB) *gorm.DB) *Finder
- func (f *Finder) SetWheres(wheres where.Wheres) *Finder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Finder ¶
type Finder struct { Model interface{} // 查询的模型 Wheres where.Wheres // 查询条件 Recipient interface{} // 查询结果保存的对象 OrderBy string // 排序条件 IgnoreNotFound bool // 是否过滤未找到数据的错误 Preloads []string // 预加载关联数据的表名 Scopes []func(db *gorm.DB) *gorm.DB // 查询作用域 Num, Size int // 分页页码, 单页大小 Total *int64 // 总数 }
func (*Finder) SetIgnoreNotFound ¶
func (*Finder) SetOrderBy ¶
func (*Finder) SetPreloads ¶
func (*Finder) SetRecipient ¶
Click to show internal directories.
Click to hide internal directories.