db

package
v0.0.0-...-448c073 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChargeCustomerForPO

func ChargeCustomerForPO(pid int) error

func CreateBook

func CreateBook(title, author string, price float32) (int, error)

func CreateCustomer

func CreateCustomer(name, shippingAddr string) (int, error)

func CreatePO

func CreatePO(book, customer int) (int, error)

func CustomerBalance

func CustomerBalance(cid int) (float32, error)

func GetBookId

func GetBookId(title, author string) (int, error)

func GetBookPrice

func GetBookPrice(bid int) (float32, error)

func GetCustomerAddress

func GetCustomerAddress(cid int) (string, error)

func GetCustomerId

func GetCustomerId(name, shippingAddr string) (int, error)

func GetPOByContents

func GetPOByContents(book, customer int) (int, error)

func IsPOShipped

func IsPOShipped(pid int) (bool, error)

func ShipPO

func ShipPO(pid int) error

func UpdateCustomerAddress

func UpdateCustomerAddress(cid int, newAddr string) error

Types

type Database

type Database struct {
	Db *sql.DB
}

func Connect

func Connect() *Database

Jump to

Keyboard shortcuts

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