mysql

package
v0.0.0-...-91d1150 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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

type MysqlHandler struct {
	DB *sql.DB
}

MysqlHandler ...

func NewHandler

func NewHandler(db *sql.DB) *MysqlHandler

func (MysqlHandler) Delete

func (m MysqlHandler) Delete(ctx context.Context, id string) error

Delete ...

func (MysqlHandler) Fetch

func (m MysqlHandler) Fetch(ctx context.Context, param models.Filter) ([]models.Category, error)

Fetch ...

func (MysqlHandler) GetByID

func (m MysqlHandler) GetByID(ctx context.Context, id int64) (models.Category, error)

GetByID ...

func (MysqlHandler) GetBySlug

func (m MysqlHandler) GetBySlug(ctx context.Context, slug string) (models.Category, error)

GetBySlug ...

func (MysqlHandler) Store

func (m MysqlHandler) Store(ctx context.Context, c *models.Category) error

Store ...

func (MysqlHandler) Update

func (m MysqlHandler) Update(ctx context.Context, c *models.Category) error

Update ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL