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

Method Tx

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

10950// Tx returns an `ent.Tx` for mutations that were executed in transactions;
10951// it returns an error otherwise.
10952func (m ProjectMutation) Tx() (*Tx, error) {
10953 if _, ok := m.driver.(*txDriver); !ok {
10954 return nil, errors.New("ent: mutation is not running in a transaction")
10955 }
10956 tx := &Tx{config: m.config}
10957 tx.init()
10958 return tx, nil
10959}
10960
10961// SetID sets the value of the id field. Note that this
10962// operation is only accepted on creation of Project entities.

Callers

nothing calls this directly

Calls 1

initMethod · 0.95

Tested by

no test coverage detected