Documentation ¶
Index ¶
- Constants
- type MysqlHandler
- func (m MysqlHandler) Delete(ctx context.Context, id string) error
- func (m MysqlHandler) Fetch(ctx context.Context, param models.Filter) ([]models.Category, error)
- func (m MysqlHandler) GetByID(ctx context.Context, id int64) (models.Category, error)
- func (m MysqlHandler) GetBySlug(ctx context.Context, slug string) (models.Category, error)
- func (m MysqlHandler) Store(ctx context.Context, c *models.Category) error
- func (m MysqlHandler) Update(ctx context.Context, c *models.Category) error
Constants ¶
View Source
const (
// MysqlDuplicateStatusCode (Read for mysql documentation about this error code)
MysqlDuplicateStatusCode = 1062
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MysqlHandler ¶
MysqlHandler ...
func NewHandler ¶
func NewHandler(db *sql.DB) *MysqlHandler
func (MysqlHandler) Delete ¶
func (m MysqlHandler) Delete(ctx context.Context, id string) error
Delete ...
Click to show internal directories.
Click to hide internal directories.