MCPcopy Create free account
hub / github.com/crowdsecurity/crowdsec / Exec

Method Exec

pkg/database/ent/machine_create.go:1551–1564  ·  view source on GitHub ↗

Exec executes the query.

(ctx context.Context)

Source from the content-addressed store, hash-verified

1549
1550// Exec executes the query.
1551func (u *MachineUpsertBulk) Exec(ctx context.Context) error {
1552 if u.create.err != nil {
1553 return u.create.err
1554 }
1555 for i, b := range u.create.builders {
1556 if len(b.conflict) != 0 {
1557 return fmt.Errorf("ent: OnConflict was set for builder %d. Set it on the MachineCreateBulk instead", i)
1558 }
1559 }
1560 if len(u.create.conflict) == 0 {
1561 return errors.New("ent: missing options for MachineCreateBulk.OnConflict")
1562 }
1563 return u.create.Exec(ctx)
1564}
1565
1566// ExecX is like Exec, but panics if an error occurs.
1567func (u *MachineUpsertBulk) ExecX(ctx context.Context) {

Callers

nothing calls this directly

Calls 1

ExecMethod · 0.45

Tested by

no test coverage detected