mysql

package
v0.0.0-...-bc11111 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(sqlHandler trysql.SqlHandler) error

Do 调用 sqlHandler

func DoContext

func DoContext(ctx context.Context, sqlHandler trysql.SqlHandler) error

DoContext 调用 sqlHandler

func DoInTx

func DoInTx(sqlHandler trysql.SqlHandler) error

DoInTx 在事务中 调用 sqlHandler

func DoInTxContext

func DoInTxContext(ctx context.Context, sqlHandler trysql.SqlHandler) error

DoInTxContext 在事务中 调用 sqlHandler

func InitDB

func InitDB(dsn string, maxActive, maxIdle, maxLifeSeconds int, logSql bool) error

InitDB 初始化数据配置。 dsn 数据库连接字符串。 尝试根据指定的连接字符串创建数据库连接并且Ping,如果成功则返回nil,否则返回连接时发生的错误。

Types

This section is empty.

Jump to

Keyboard shortcuts

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