MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / Tx

Method Tx

app/controlplane/pkg/data/ent/mutation.go:5576–5583  ·  view source on GitHub ↗

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

()

Source from the content-addressed store, hash-verified

5574// Tx returns an `ent.Tx` for mutations that were executed in transactions;
5575// it returns an error otherwise.
5576func (m IntegrationMutation) Tx() (*Tx, error) {
5577 if _, ok := m.driver.(*txDriver); !ok {
5578 return nil, errors.New("ent: mutation is not running in a transaction")
5579 }
5580 tx := &Tx{config: m.config}
5581 tx.init()
5582 return tx, nil
5583}
5584
5585// SetID sets the value of the id field. Note that this
5586// operation is only accepted on creation of Integration entities.

Callers

nothing calls this directly

Calls 1

initMethod · 0.95

Tested by

no test coverage detected