test1

package
v0.0.0-...-2bf1368 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Db *sqlx.DB

Db 数据库连接

Functions

func Delete

func Delete()

Delete 删除数据库中数据

func FindIDByName

func FindIDByName(name string) (id int)

FindIDByName 由姓名查找ID ,如果找到返回ID值,如果没有返回-1

func Insert

func Insert()

Insert 插入函数

func SelectSQL

func SelectSQL()

SelectSQL 选取一些数据

func Update

func Update()

Update 修改数据库中数据

Types

type User

type User struct {
	ID       int    `db:"id"`
	Password string `db:"password"`
	UserName string `db:"userName"`
	Email    string `db:"email"`
}

User 用户

Jump to

Keyboard shortcuts

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