Documentation
¶
Overview ¶
Package dao is the data access object, the code for database operation is unified here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserExampleDao ¶
type UserExampleDao interface {
Create(ctx context.Context, table *model.UserExample) error
DeleteByID(ctx context.Context, id uint64) error
UpdateByID(ctx context.Context, table *model.UserExample) error
GetByID(ctx context.Context, id uint64) (*model.UserExample, error)
GetByColumns(ctx context.Context, params *query.Params) ([]*model.UserExample, int64, error)
CreateByTx(ctx context.Context, tx *gorm.DB, table *model.UserExample) (uint64, error)
DeleteByTx(ctx context.Context, tx *gorm.DB, id uint64) error
UpdateByTx(ctx context.Context, tx *gorm.DB, table *model.UserExample) error
}
UserExampleDao defining the dao interface
func NewUserExampleDao ¶
func NewUserExampleDao(db *gorm.DB, xCache cache.UserExampleCache) UserExampleDao
NewUserExampleDao creating the dao interface
Click to show internal directories.
Click to hide internal directories.