db

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Client *sqlx.DB

Client 默认数据库实例

Functions

func C added in v0.1.14

func C(name string) *sqlx.DB

C 获取连接的实例

func Conn

func Conn() *sqlx.DB

Conn 用配置文件的默认参数连接数据库

func Connect

func Connect(prePath string) *sqlx.DB

Connect 用配置文件连接数据库

func ConnectDB

func ConnectDB(dataSourceName string) (*sqlx.DB, error)

ConnectDB 用连接字符串连接数据库

func Init

func Init()

Init 默认初始化

func SetClient added in v0.1.14

func SetClient(name string, client *sqlx.DB)

SetClient 设置数据库连接实例

Types

This section is empty.

Jump to

Keyboard shortcuts

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