sqlx

package
v0.0.0-...-9a786c4 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Db *sqlx.DB

实例化数据库对象

Functions

func AddNewUser

func AddNewUser(u model.User) bool

往user_info表添加一条新的记录

func AddUserInfo

func AddUserInfo(phoneNum string, passwd string) bool

func InitDB

func InitDB() (err error)

InitDB 初始化数据库(需要先在docker中启动db镜像并建立malldb的数据源)

func QueryUserInfo

func QueryUserInfo(phoneNum string) model.User

func TestDataBase

func TestDataBase()

TestDataBase 学习数据库sqlx框架的CRUD实验方法

Types

This section is empty.

Jump to

Keyboard shortcuts

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