MCPcopy
hub / github.com/crowdsecurity/crowdsec / SaveX

Method SaveX

pkg/database/ent/lock_update.go:41–47  ·  view source on GitHub ↗

SaveX is like Save, but panics if an error occurs.

(ctx context.Context)

Source from the content-addressed store, hash-verified

39
40// SaveX is like Save, but panics if an error occurs.
41func (_u *LockUpdate) SaveX(ctx context.Context) int {
42 affected, err := _u.Save(ctx)
43 if err != nil {
44 panic(err)
45 }
46 return affected
47}
48
49// Exec executes the query.
50func (_u *LockUpdate) Exec(ctx context.Context) error {

Callers 6

TestAPICCAPIPullIsOldFunction · 0.45
TestGetDecisionsCountFunction · 0.45

Calls 1

SaveMethod · 0.95

Tested by 6

TestAPICCAPIPullIsOldFunction · 0.36
TestGetDecisionsCountFunction · 0.36