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

Method Tx

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

3978// Tx returns an `ent.Tx` for mutations that were executed in transactions;
3979// it returns an error otherwise.
3980func (m GroupMutation) Tx() (*Tx, error) {
3981 if _, ok := m.driver.(*txDriver); !ok {
3982 return nil, errors.New("ent: mutation is not running in a transaction")
3983 }
3984 tx := &Tx{config: m.config}
3985 tx.init()
3986 return tx, nil
3987}
3988
3989// SetID sets the value of the id field. Note that this
3990// operation is only accepted on creation of Group entities.

Callers

nothing calls this directly

Calls 1

initMethod · 0.95

Tested by

no test coverage detected