mysql

package
v0.0.0-...-4f5c9a4 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	ID           int64  `db:"id"`
	CategoryName string `db:"category_name"`
	AppID        int64  `db:"app_id"`
	IsActive     int8   `db:"is_active"`
}

category struct

type Categorys

type Categorys []Category

category list

type MySQL

type MySQL struct {
	// contains filtered or unexported fields
}

MySQL struct

func New

func New(db *sqlx.DB) *MySQL

New init mysql

func (*MySQL) Delete

func (m *MySQL) Delete(ctx context.Context, c *entity.Category) (err error)

func (*MySQL) GetByID

func (m *MySQL) GetByID(ctx context.Context, app int64, id int64, all bool) (category *entity.Category, err error)

func (*MySQL) Insert

func (m *MySQL) Insert(ctx context.Context, c *entity.Category) (err error)

func (*MySQL) Select

func (m *MySQL) Select(ctx context.Context, app int64, all bool) (categorys entity.Categorys, err error)

func (*MySQL) Update

func (m *MySQL) Update(ctx context.Context, c *entity.Category) (err error)

Jump to

Keyboard shortcuts

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