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

Method Save

pkg/database/ent/machine_create.go:246–249  ·  view source on GitHub ↗

Save creates the Machine in the database.

(ctx context.Context)

Source from the content-addressed store, hash-verified

244
245// Save creates the Machine in the database.
246func (_c *MachineCreate) Save(ctx context.Context) (*Machine, error) {
247 _c.defaults()
248 return withHooks(ctx, _c.sqlSave, _c.mutation, _c.hooks)
249}
250
251// SaveX calls Save and panics if Save returns an error.
252func (_c *MachineCreate) SaveX(ctx context.Context) *Machine {

Callers 3

SaveXMethod · 0.95
ExecMethod · 0.95
IDMethod · 0.45

Calls 2

defaultsMethod · 0.95
withHooksFunction · 0.85

Tested by

no test coverage detected