mysql

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2020 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// go time format strings
	MySQLTimestampDay    = "2006-01-02"
	MySQLTimestampHour   = "2006-01-02 15:00:00"
	MySQLTimestampMinute = "2006-01-02 15:04:00"
	MySQLDateTime        = "2006-01-02 15:04:05"
	MySQLDate            = "2006-01-02"
	MySQLTime            = "15:04:05"

	// mysql datetime format strings
	MySQLInternalFormat = "%Y-%m-%d %H:%i:%s"
	MySQLDTMinute       = "%Y-%m-%d %H:%i"
	MySQLDTHour         = "%Y-%m-%d %H"
	MySQLDTDay          = "%Y-%m-%d"
)
View Source
const (
	ERR_UNDEFINED_DSN = "connection error: MySQL DSN '%s' is undefined"
)

Variables

This section is empty.

Functions

func Connect

func Connect(dsn, certName, certPath string, maxconns int) *sql.DB

Connect connects to the DSN at the given ENV VAR and fails quietly

func MustConnect

func MustConnect(dsn, certName, certPath string, maxconns int) *sql.DB

MustConnect connects to the DSN at the given ENV VAR and fails loudly if unable to do so.

func ParseMySQLDateTime

func ParseMySQLDateTime(t string) time.Time

func TLS

func TLS(configName, certPath string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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