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

Method ExecX

pkg/database/ent/machine_create.go:1065–1069  ·  view source on GitHub ↗

ExecX is like Exec, but panics if an error occurs.

(ctx context.Context)

Source from the content-addressed store, hash-verified

1063
1064// ExecX is like Exec, but panics if an error occurs.
1065func (u *MachineUpsertOne) ExecX(ctx context.Context) {
1066 if err := u.create.Exec(ctx); err != nil {
1067 panic(err)
1068 }
1069}
1070
1071// Exec executes the UPSERT query and returns the inserted/updated ID.
1072func (u *MachineUpsertOne) ID(ctx context.Context) (id int, err error) {

Callers

nothing calls this directly

Calls 1

ExecMethod · 0.45

Tested by

no test coverage detected