Documentation ¶
Index ¶
Constants ¶
View Source
const DEFAULT_CONNECTION = "default"
Variables ¶
View Source
var Clients map[string]*gorm.DB
Functions ¶
func CausedByLostConnection ¶
func CloseClients ¶
func CloseClients()
func CreateDefault ¶
Types ¶
type ConnWrapper ¶
func Connection ¶
func Connection(connection string) *ConnWrapper
func DefaultConnection ¶
func DefaultConnection() *ConnWrapper
func (*ConnWrapper) BeginTx ¶
func (cw *ConnWrapper) BeginTx(opts ...*sql.TxOptions) *ConnWrapper
func (*ConnWrapper) CommitTx ¶
func (cw *ConnWrapper) CommitTx(originCw *ConnWrapper) *ConnWrapper
func (*ConnWrapper) Txn ¶
func (cw *ConnWrapper) Txn(fc func(tx *ConnWrapper) error, opts ...*sql.TxOptions) error
Click to show internal directories.
Click to hide internal directories.