Documentation ¶
Index ¶
- type Dao
- func (dao *Dao) AutoMigrate(dst interface{}, settings ...map[string]interface{}) error
- func (Dao) BeanName() string
- func (dao *Dao) Ctx(ctx context.Context) *Dao
- func (dao *Dao) DB() *gorm.DB
- func (dao *Dao) Delete(cause *wrapper.Query) (int64, error)
- func (dao *Dao) Distinct(args ...interface{}) *Dao
- func (dao *Dao) Exist(cause *wrapper.Query) (exist bool, err error)
- func (dao *Dao) FindAll(cause *wrapper.Query, target interface{}) error
- func (dao *Dao) FindOne(cause *wrapper.Query, target interface{}) (ok bool, err error)
- func (dao *Dao) Insert(value interface{}) error
- func (dao *Dao) InsertIgnore(value interface{}) error
- func (dao *Dao) List(cause *wrapper.Query, target interface{}, limit ...int) error
- func (dao *Dao) Model(value interface{}) *Dao
- func (dao *Dao) Page(cause *wrapper.Query, target interface{}, page, size int) (total int64, err error)
- func (dao *Dao) Replace(value interface{}) error
- func (dao *Dao) Select(query interface{}, args ...interface{}) *Dao
- func (dao *Dao) Sum(field string, cause *wrapper.Query, target interface{}) (err error)
- func (dao *Dao) Table(name string, args ...interface{}) *Dao
- func (dao *Dao) Transaction(fc func(tx *Dao) error, opts ...*sql.TxOptions) error
- func (dao *Dao) Update(update *wrapper.Update) (int64, error)
- func (dao *Dao) Upsert(value interface{}, update *wrapper.Update) error
- func (dao *Dao) Where(wrapper *wrapper.Query) *gorm.DB
- type Mapper
- func (dao *Mapper[T]) AutoMigrate(settings ...map[string]interface{}) error
- func (dao *Mapper[T]) Count(cause *wrapper.Query) (total int64, err error)
- func (dao *Mapper[T]) DB() *gorm.DB
- func (dao *Mapper[T]) Delete(cause *wrapper.Query) (int64, error)
- func (dao *Mapper[T]) Distinct(args ...interface{}) *Mapper[T]
- func (dao *Mapper[T]) Exist(cause *wrapper.Query) (exist bool, err error)
- func (dao *Mapper[T]) GetAll(cause *wrapper.Query) (records *[]T, err error)
- func (dao *Mapper[T]) GetOne(cause *wrapper.Query) (record *T, err error)
- func (dao *Mapper[T]) Insert(value interface{}) error
- func (dao *Mapper[T]) InsertIgnore(value interface{}) error
- func (dao *Mapper[T]) List(cause *wrapper.Query, limit ...int) (records *[]T, err error)
- func (dao *Mapper[T]) Page(cause *wrapper.Query, page, size int) (records *[]T, total int64, err error)
- func (dao *Mapper[T]) Replace(value interface{}) error
- func (dao *Mapper[T]) Select(query interface{}, args ...interface{}) *Mapper[T]
- func (dao *Mapper[T]) Sum(field string, cause *wrapper.Query) (sum int64, err error)
- func (dao *Mapper[T]) SumDecimal(field string, cause *wrapper.Query) (sum float64, err error)
- func (dao *Mapper[T]) Table(name string, args ...interface{}) *Mapper[T]
- func (dao *Mapper[T]) Transaction(fn func(tx *gorm.DB) error, opts ...*sql.TxOptions) error
- func (dao *Mapper[T]) Update(update *wrapper.Update) (int64, error)
- func (dao *Mapper[T]) Upsert(value interface{}, update *wrapper.Update) error
- func (dao *Mapper[T]) Where(wrapper *wrapper.Query) *gorm.DB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
type Dao struct {
// contains filtered or unexported fields
}
func (*Dao) AutoMigrate ¶
func (*Dao) InsertIgnore ¶ added in v0.1.0
func (*Dao) Transaction ¶
type Mapper ¶ added in v0.1.1
type Mapper[T any] struct { // contains filtered or unexported fields }
func (*Mapper[T]) AutoMigrate ¶ added in v0.1.1
func (*Mapper[T]) InsertIgnore ¶ added in v0.1.1
func (*Mapper[T]) SumDecimal ¶ added in v0.1.1
func (*Mapper[T]) Transaction ¶ added in v0.1.1
Click to show internal directories.
Click to hide internal directories.