package
1.0.2
Repository: https://github.com/pangj520/hello.git
Documentation: pkg.go.dev

# Functions

* 生成masterInstances、slaveInstances map的key */.
No description provided by the author
* *新建数据库连接,为sql执行获得连接实例 * 输入: * c - 数据库连接配置 * 返回: 数据库连接对象 */.
使用ORM操作数据库,操作失败会进行重试 输入: ctx: 上下文 getDb: 获取ORM DB实例的方法 do: 如何对数据库进行操作的方法,方法第一个参数为*OrmDb failDbs: 操作失败的*OrmDb,这些*OrmDb在重试过程中不会被再次使用 输出: 异常.
使用Stmt操作数据库,操作失败会进行重试 输入: getDb: 获取Stmt DB实例的方法 do: 如何对数据库进行操作的方法,方法第一个参数为*StmtDb retryTimes: 重试次数,默认为0,不进行重试 failDbs: 操作失败的*StmtDb,这些*StmtDb在重试过程中不会被再次使用 输出: 异常.
* *事务控制,一旦出现错误则回滚,会检查操作函数f的返回值,如果error不为空也回滚 *参数: * db: 数据库对象 * f: 操作数据库的函数, 函数的第一个参数类型必须为*gorm.DB或*sql.Tx * args: 函数f的参数 *返回: * error: 参数类型有误或事务异常 */.

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
无效的连接.
No description provided by the author
No description provided by the author
mysql driver相关错误.
No description provided by the author
服务发现未发现任何sql实例.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
gorm相关错误.
No description provided by the author
No description provided by the author

# Structs

Config mysql config.
No description provided by the author
No description provided by the author
No description provided by the author
ORM日志.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author