func (tx *Tx) OnCommit(f func(error)) {
	tx.mu.Lock()
	defer tx.mu.Unlock()
	tx.onCommit = append(tx.onCommit, f)
}
// OnCommit adds a function to call on commit.
OnCommit adds a function to call on commit.
// OnCommit adds a function to call on commit .
func (tx *Tx) OnCommit(f func(error)) {
	tx.mu.Lock()
	defer tx.mu.Unlock()
	tx.onCommit = append(tx.onCommit, f)
}
func ( tx * Tx ) OnCommit ( f func ( error ) ) { tx . mu . Lock ( ) defer tx . mu . Unlock ( ) tx . onCommit = append ( tx . onCommit , f ) }
OnCommit adds a function to call on commit.
OnCommit adds a function to call on commit .