MCPcopy Create free account
hub / github.com/lib/pq / checkIsInTransaction

Method checkIsInTransaction

conn.go:469–475  ·  view source on GitHub ↗
(intxn bool)

Source from the content-addressed store, hash-verified

467}
468
469func (cn *conn) checkIsInTransaction(intxn bool) error {
470 if cn.isInTransaction() != intxn {
471 cn.err.set(driver.ErrBadConn)
472 return fmt.Errorf("pq: unexpected transaction status %v", cn.txnStatus)
473 }
474 return nil
475}
476
477func (cn *conn) Begin() (_ driver.Tx, err error) {
478 return cn.begin("")

Callers 3

beginMethod · 0.95
CommitMethod · 0.95
rollbackMethod · 0.95

Calls 2

isInTransactionMethod · 0.95
setMethod · 0.80

Tested by

no test coverage detected