queries

package
v0.0.0-...-557f8b3 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BookQueries

type BookQueries struct {
	*sqlx.DB
}

BookQueries struct for queries from Book model.

func (*BookQueries) CreateBook

func (q *BookQueries) CreateBook(b *models.Book) error

CreateBook method for creating book by given Book object.

func (*BookQueries) DeleteBook

func (q *BookQueries) DeleteBook(id uuid.UUID) error

DeleteBook method for delete book by given ID.

func (*BookQueries) GetBook

func (q *BookQueries) GetBook(id uuid.UUID) (models.Book, error)

GetBook method for getting one book by given ID.

func (*BookQueries) GetBooks

func (q *BookQueries) GetBooks() ([]models.Book, error)

GetBooks method for getting all books.

func (*BookQueries) UpdateBook

func (q *BookQueries) UpdateBook(id uuid.UUID, b *models.Book) error

UpdateBook method for updating book by given Book object.

Jump to

Keyboard shortcuts

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