mysql

package
v0.0.0-...-bf94844 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mysql

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

Mysql connection

func New

func New(db *sqlx.DB) (m *Mysql)

New returns an instance of Mysql connection

func (*Mysql) Close

func (m *Mysql) Close() error

func (Mysql) Find

func (m Mysql) Find(ctx context.Context, limit int) ([]entity.Person, error)

func (Mysql) FindOne

func (m Mysql) FindOne(ctx context.Context, id int64) (*entity.Person, error)

func (Mysql) SavePerson

func (m Mysql) SavePerson(ctx context.Context, person entity.Person) (int64, error)

Jump to

Keyboard shortcuts

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