mysql

package
v0.0.0-...-a14fa2b Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTable

func CreateTable(db *sql.DB, tableName string) error

CreateTable -

func DeleteByID

func DeleteByID(db *sql.DB, tableName string, shopId int) error

DeleteByID delete by id

func InsertShop

func InsertShop(db *sql.DB, tableName, shopName, address, cover, article string, like bool) (int, error)

InsertShop return id

Types

type Shop

type Shop struct {
	ShopID   uint64
	ShopName string
	Address  string
	Cover    string
	Article  string
	Like     bool
}

func InfoByID

func InfoByID(db *sql.DB, tableName string, shopId uint64) (*Shop, error)

InfoByID query by id

func ListShop

func ListShop(db *sql.DB, tableName string) ([]*Shop, error)

listShop return shop list

Jump to

Keyboard shortcuts

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