package
0.0.3
Repository: https://github.com/hujingwei/go-zero.git
Documentation: pkg.go.dev

# README

database/sql

项目简介

MySQL数据库驱动,进行封装加入了链路追踪和统计。

如果需要SQL级别的超时管理 可以在业务代码里面使用context.WithDeadline实现 推荐超时配置放到application.toml里面 方便热加载

依赖包
  1. Go-MySQL-Driver

# Functions

NewMySQL new db and retry connection when has error.
Open opens a database specified by its database driver name and a driver-specific data source name, usually consisting of at least a database name and connection information.

# Variables

ErrNoMaster is returned by Master when call master multiple times.
ErrNoRows is returned by Scan when QueryRow doesn't return a row.
ErrStmtNil prepared stmt error.
ErrTxDone transaction done.

# Structs

Config mysql config.
DB database.
Row row.
Rows rows.
Stmt prepared stmt.
Tx transaction.