MCPcopy Create free account
hub / github.com/efectn/go-orm-benchmarks / Save

Method Save

bench/ent/model_create.go:70–72  ·  view source on GitHub ↗

Save creates the Model in the database.

(ctx context.Context)

Source from the content-addressed store, hash-verified

68
69// Save creates the Model in the database.
70func (mc *ModelCreate) Save(ctx context.Context) (*Model, error) {
71 return withHooks(ctx, mc.sqlSave, mc.mutation, mc.hooks)
72}
73
74// SaveX calls Save and panics if Save returns an error.
75func (mc *ModelCreate) SaveX(ctx context.Context) *Model {

Callers 12

SaveXMethod · 0.95
ExecMethod · 0.95
InsertMethod · 0.45
InsertMultiMethod · 0.45
UpdateMethod · 0.45
ReadMethod · 0.45
ReadSliceMethod · 0.45
InsertMethod · 0.45
UpdateMethod · 0.45
ReadMethod · 0.45
ReadSliceMethod · 0.45
mutateMethod · 0.45

Calls 1

withHooksFunction · 0.85

Tested by

no test coverage detected