package
module
Version:
v0.1.0
Opens a new window with list of versions in this module.
Published: Sep 8, 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"`
}
Transaction master transaction
TransactionWithSession support transaction nested
if tx is started, sess will not commit
Source Files
¶
Click to show internal directories.
Click to hide internal directories.