model

package
v0.0.0-...-bc8dbb9 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = sqlx.ErrNotFound

Functions

This section is empty.

Types

type Book

type Book struct {
	Id    int64  `db:"id"`    // ID
	Book  string `db:"book"`  // Book name
	Price int64  `db:"price"` // book price
}

type BookModel

type BookModel interface {
	Insert(data Book) (sql.Result, error)
	FindOne(id int64) (*Book, error)
	Update(data Book) error
	Delete(id int64) error
}

func NewBookModel

func NewBookModel(conn sqlx.SqlConn, c cache.CacheConf) BookModel

Jump to

Keyboard shortcuts

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