db

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MySQL      = "mysql"
	SQLServer  = "mssql"
	Oracle     = "oracle"
	PostgreSQL = "postgres"
	SQLite     = "sqlite3"
)

Variables

This section is empty.

Functions

func Create

func Create(dbType string, connectionString string, maxIdleConns int, maxOpenConns int) (db *sqlx.DB, err error)

创建数据连接 @dbType 数据库驱动类型 @connectionString 数据库连接字符串 @maxIdleConns 最大连接数 @maxOpenConns 当无连接时,最大的保持连接的连接数

func CreateMySQLDefault added in v0.0.19

func CreateMySQLDefault(connectionString string) (db *sqlx.DB, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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