code: func (tx *transaction) checkClosed() error {
  	// The transaction is no longer valid if it has been closed.
  	if tx.closed {
  		return makeDbErr(database.ErrTxClosed, errTxClosedStr, nil)
  	}
  
  	return nil
  }
docs: // checkClosed returns an error if the the database or transaction is closed.