service_sqlx

package
v0.0.0-...-303f5d6 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2019 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *sqlx.DB

Functions

func InitDb

func InitDb()

TODO : 初始化数据库

func SelectAll

func SelectAll(sql string, data interface{})

TODO : 查询所有数据

func SelectOne

func SelectOne(sql string, data interface{}, args ...interface{})

TODO : 查询一条数据

func UpdateDate

func UpdateDate(sql string, args ...interface{}) (result driver.Result)

TODO : 修改数据

Types

type DataConfig

type DataConfig struct {
	DbHost     string
	DbUser     string
	DbPassword string
	DbName     string
	DbPort     string
}

数据库配置

Jump to

Keyboard shortcuts

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