MCPcopy Index your code
hub / github.com/cloudreve/cloudreve / Save

Method Save

ent/task_create.go:163–168  ·  view source on GitHub ↗

Save creates the Task in the database.

(ctx context.Context)

Source from the content-addressed store, hash-verified

161
162// Save creates the Task in the database.
163func (tc *TaskCreate) Save(ctx context.Context) (*Task, error) {
164 if err := tc.defaults(); err != nil {
165 return nil, err
166 }
167 return withHooks(ctx, tc.sqlSave, tc.mutation, tc.hooks)
168}
169
170// SaveX calls Save and panics if Save returns an error.
171func (tc *TaskCreate) SaveX(ctx context.Context) *Task {

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