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

Method Tx

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

3227// Tx returns an `ent.Tx` for mutations that were executed in transactions;
3228// it returns an error otherwise.
3229func (m CASMappingMutation) Tx() (*Tx, error) {
3230 if _, ok := m.driver.(*txDriver); !ok {
3231 return nil, errors.New("ent: mutation is not running in a transaction")
3232 }
3233 tx := &Tx{config: m.config}
3234 tx.init()
3235 return tx, nil
3236}
3237
3238// SetID sets the value of the id field. Note that this
3239// operation is only accepted on creation of CASMapping entities.

Callers

nothing calls this directly

Calls 1

initMethod · 0.95

Tested by

no test coverage detected