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

Method Tx

app/controlplane/pkg/data/ent/mutation.go:9130–9137  ·  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

9128// Tx returns an `ent.Tx` for mutations that were executed in transactions;
9129// it returns an error otherwise.
9130func (m OrganizationMutation) Tx() (*Tx, error) {
9131 if _, ok := m.driver.(*txDriver); !ok {
9132 return nil, errors.New("ent: mutation is not running in a transaction")
9133 }
9134 tx := &Tx{config: m.config}
9135 tx.init()
9136 return tx, nil
9137}
9138
9139// SetID sets the value of the id field. Note that this
9140// operation is only accepted on creation of Organization entities.

Callers

nothing calls this directly

Calls 1

initMethod · 0.95

Tested by

no test coverage detected