mysql

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: MIT Imports: 6 Imported by: 2

Documentation

Overview

Example
os.Setenv("MYSQL_USER", "user")
os.Setenv("MYSQL_PASSWORD", "pass")
os.Setenv("MYSQL_DATABASE", "db")
os.Setenv("MYSQL_HOST", "localhost")

mysql.Initialize()
db := mysql.Conn()

db.Begin()
Output:

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Conn

func Conn() *sql.DB

func GetConnection

func GetConnection(connectionName string) *sql.DB

func Initialize

func Initialize() (err error)

func InitializeWithCustomParameter

func InitializeWithCustomParameter(connectionName, user, password, host, database string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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