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

Method check

ent/task_update.go:206–213  ·  view source on GitHub ↗

check runs all checks and user-defined validators on the builder.

()

Source from the content-addressed store, hash-verified

204
205// check runs all checks and user-defined validators on the builder.
206func (tu *TaskUpdate) check() error {
207 if v, ok := tu.mutation.Status(); ok {
208 if err := task.StatusValidator(v); err != nil {
209 return &ValidationError{Name: "status", err: fmt.Errorf(`ent: validator failed for field "Task.status": %w`, err)}
210 }
211 }
212 return nil
213}
214
215func (tu *TaskUpdate) sqlSave(ctx context.Context) (n int, err error) {
216 if err := tu.check(); err != nil {

Callers 1

sqlSaveMethod · 0.95

Calls 2

StatusValidatorFunction · 0.92
StatusMethod · 0.65

Tested by

no test coverage detected