Documentation ¶
Index ¶
- type Option
- func BatchInsertSize(n int) Option
- func Group(s string) Option
- func HardDelete() Option
- func Having(s string) Option
- func Join(s string) Option
- func Limit(n int) Option
- func Offset(n int) Option
- func Order(s string) Option
- func Select(s string) Option
- func Table(t schema.Tabler) Option
- func Where(condition string, value ...any) Option
- type Options
- type Query
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Options)
func BatchInsertSize ¶
func HardDelete ¶
func HardDelete() Option
type Query ¶
type Query interface { GetDB() *gorm.DB SetDB(db *gorm.DB) Transaction(func(tx *gorm.DB) error) error Save(row schema.Tabler) error Create(newRow schema.Tabler) error BatchInsert(table schema.Tabler, newRows any, opts ...Option) error FindOneByWhere(rows any, opts ...Option) error FindByWhere(rows any, opts ...Option) error ScanByWhere(table schema.Tabler, row any, opts ...Option) error // 用于自定义结构体 DeleteByWhere(table schema.Tabler, opts ...Option) error UpdateByWhere(newRow any, opts ...Option) error CountByWhere(table schema.Tabler, count *int64, opts ...Option) error SearchAll(table schema.Tabler, total *int64, list any, page, limit int, opt ...Option) error }
Click to show internal directories.
Click to hide internal directories.