func (tx *Tx) Commit() error {
	err := tx.config.driver.(*txDriver).tx.Commit()
	tx.mu.Lock()
	defer tx.mu.Unlock()
	for _, f := range tx.onCommit {
		f(err)
	}
	return err
}
// Commit commits the transaction.
Commit commits the transaction.
// Commit commits the transaction .
func (tx *Tx) Commit() error {
	err := tx.config.driver.(*txDriver).tx.Commit()
	tx.mu.Lock()
	defer tx.mu.Unlock()
	for _, f := range tx.onCommit {
		f(err)
	}
	return err
}
func ( tx * Tx ) Commit ( ) error { err := tx . config . driver . ( * txDriver ) . tx . Commit ( ) tx . mu . Lock ( ) defer tx . mu . Unlock ( ) for _ , f := range tx . onCommit { f ( err ) } return err }
Commit commits the transaction.
Commit commits the transaction .