mysql

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

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

Go to latest
Published: Dec 15, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BookModel

type BookModel struct {
	DB *sql.DB
}

func (*BookModel) Add

func (b *BookModel) Add(book *models.Book) error

func (*BookModel) Delete

func (b *BookModel) Delete(id int) error

func (*BookModel) GetAll

func (b *BookModel) GetAll() ([]*models.Book, error)

func (*BookModel) GetById

func (b *BookModel) GetById(id int) (*models.Book, error)

func (*BookModel) GetByName

func (b *BookModel) GetByName(name string) ([]*models.Book, error)

func (*BookModel) Update

func (b *BookModel) Update(book *models.Book) error

Jump to

Keyboard shortcuts

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