Documentation ¶
Index ¶
- Variables
- func Check(ctx context.Context, db *gorm.DB) (bool, error)
- func ExecTrans(ctx context.Context, db *gorm.DB, fn TransFunc) error
- func ExecTransWithLock(ctx context.Context, db *gorm.DB, fn TransFunc) error
- func FindOne(ctx context.Context, db *gorm.DB, out interface{}) (bool, error)
- func FindPage(ctx context.Context, db *gorm.DB, pp schema.PaginationParam, out interface{}) (int64, error)
- func GetDB(ctx context.Context, defDB *gorm.DB) *gorm.DB
- func GetDBWithModel(ctx context.Context, defDB *gorm.DB, m interface{}) *gorm.DB
- func ParseOrder(items []*schema.OrderField, handle ...OrderFieldFunc) string
- func WrapPageQuery(ctx context.Context, db *gorm.DB, pp schema.PaginationParam, out interface{}) (*schema.PaginationResult, error)
- type Model
- type OrderFieldFunc
- type Trans
- type TransFunc
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ExecTransWithLock ¶
func GetDBWithModel ¶
Get gorm.DB.Model from context
func ParseOrder ¶
func ParseOrder(items []*schema.OrderField, handle ...OrderFieldFunc) string
func WrapPageQuery ¶
func WrapPageQuery(ctx context.Context, db *gorm.DB, pp schema.PaginationParam, out interface{}) (*schema.PaginationResult, error)
Types ¶
Click to show internal directories.
Click to hide internal directories.