Documentation ¶
Index ¶
- Variables
- func Delete(model *gdb.Model) (rowsAffected int64)
- func DeleteWithError(model *gdb.Model) (rowsAffected int64, err error)
- func Find[T any](db *gdb.Model, orderBy []sys_model.OrderBy, ...) (response *sys_model.CollectRes[T], err error)
- func GetAll[T any](db *gdb.Model, info *sys_model.Pagination) (response *sys_model.CollectRes[*T], err error)
- func GetById[T any](model *gdb.Model, id int64) *T
- func GetByIdWithError[T any](model *gdb.Model, id int64) (*T, error)
- func Insert(model *gdb.Model, data ...interface{}) (rowsAffected int64)
- func InsertIgnore(model *gdb.Model, data ...interface{}) (rowsAffected int64)
- func InsertIgnoreWithError(model *gdb.Model, data ...interface{}) (rowsAffected int64, err error)
- func InsertWithError(model *gdb.Model, data ...interface{}) (rowsAffected int64, err error)
- func MakeDaoCache(table string) *gdb.CacheOption
- func Query[T any](db *gdb.Model, searchFields *sys_model.SearchParams, IsExport bool) (response *sys_model.CollectRes[T], err error)
- func RegisterDaoHook(model *gdb.Model) *gdb.Model
- func RemoveQueryCache(db gdb.DB, prefix string)
- func Save(model *gdb.Model, data ...interface{}) (rowsAffected int64)
- func SaveWithError(model *gdb.Model, data ...interface{}) (rowsAffected int64, err error)
- func Scan[T any](model *gdb.Model) *T
- func ScanList[T any](model *gdb.Model, bindToAttrName string, relationAttrNameAndFields ...string) *T
- func ScanListWithError[T any](model *gdb.Model, bindToAttrName string, relationAttrNameAndFields ...string) (*T, error)
- func ScanWithError[T any](model *gdb.Model) (*T, error)
- func Update(model *gdb.Model, dataAndWhere ...interface{}) (rowsAffected int64)
- func UpdateWithError(model *gdb.Model, dataAndWhere ...interface{}) (rowsAffected int64, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var HookHandler = gdb.HookHandler{ Update: cleanCache[gdb.HookUpdateInput], Insert: cleanCache[gdb.HookInsertInput], Delete: cleanCache[gdb.HookDeleteInput], Select: func(ctx context.Context, in *gdb.HookSelectInput) (result gdb.Result, err error) { result, err = in.Next(ctx) return }, }
Functions ¶
func DeleteWithError ¶ added in v0.2.85
func Find ¶
func Find[T any](db *gdb.Model, orderBy []sys_model.OrderBy, searchFields ...sys_model.FilterInfo) (response *sys_model.CollectRes[T], err error)
func GetAll ¶
func GetAll[T any](db *gdb.Model, info *sys_model.Pagination) (response *sys_model.CollectRes[*T], err error)
func GetByIdWithError ¶ added in v0.2.48
func InsertIgnore ¶ added in v0.2.83
func InsertIgnoreWithError ¶ added in v0.2.83
func InsertWithError ¶ added in v0.2.83
func MakeDaoCache ¶ added in v0.2.108
func MakeDaoCache(table string) *gdb.CacheOption
func Query ¶
func Query[T any](db *gdb.Model, searchFields *sys_model.SearchParams, IsExport bool) (response *sys_model.CollectRes[T], err error)
func RemoveQueryCache ¶
func SaveWithError ¶ added in v0.2.83
func ScanListWithError ¶ added in v0.2.83
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.