// Tx returns an `ent.Tx` for mutations that were executed in transactions;
// it returns an error otherwise.
Tx returns an `ent.Tx` for mutations that were executed in transactions;
it returns an error otherwise.
// Tx returns an ` ent . Tx ` for mutations that were executed in transactions ; // it returns an error otherwise .
func (m FactTypeMutation) Tx() (*Tx, error) {
	if _, ok := m.driver.(*txDriver); !ok {
		return nil, fmt.Errorf("ent: mutation is not running in a transaction")
	}
	tx := &Tx{config: m.config}
	tx.init()
	return tx, nil
}
func ( m FactTypeMutation ) Tx ( ) ( * Tx , error ) { if _ , ok := m . driver . ( * txDriver ) ; ! ok { return nil , fmt . Errorf ( " " ) } tx := & Tx { config : m . config } tx . init ( ) return tx , nil }
Tx returns an `ent.Tx` for mutations that were executed in transactions;
it returns an error otherwise.
Tx returns an ` ent . Tx ` for mutations that were executed in transactions ; it returns an error otherwise .