package
Version:
v0.0.3
Opens a new window with list of versions in this module.
Published: Aug 31, 2021
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Config struct {
ShowSQL bool `defval:"true"`
Master Conn
Slaves []Conn
MaxOpenConn int `defval:"50"`
MaxIdleConn int `defval:"200"`
ConnMaxLifetime uint `defval:"7200"`
}
type Conn struct {
Username string `defval:"root"`
Password string `defval:"111111" null:""`
HostPort string `defval:"localhost:3306"`
Database string `defval:"test"`
}
TransactionWithSession 支持事务嵌套,如果事务已经开始,则此事务失效事务的步骤
传入的 session 可以是Master/Slave/上层传入
Source Files
¶
Click to show internal directories.
Click to hide internal directories.