Documentation ¶
Overview ¶
2016-09-11 19:30 Package gxdriver provides a MySQL driver for Go's database/sql package code example: https://github.com/alexstocks/go-practice/blob/master/mysql/stmt.go
Index ¶
Constants ¶
View Source
const (
GettyMySQLDriver = "getty_mysql_driver"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MySQL ¶
feature list: 1 读写分离 2 长连接有效性检测和自动重连 3 mysql prepared statement 重用 ! Note: 在执行sql操作之前请执行CheckSQl & CheckAcitve
func (*MySQL) CheckActive ¶
func (m *MySQL) CheckActive()
检查MySQL实例的连接是否还在活跃时间范围内 ! note: 这个函数的实际意义在于更新active时间,实际的sql.DB下面有一个连接池, 完全没必要因为超时就更换conn对象。
type MySQLDriver ¶
type MySQLDriver struct { }
Click to show internal directories.
Click to hide internal directories.