func (tu *TechnicianUpdate) Save(ctx context.Context) (int, error) {
	if tu.update_time == nil {
		v := technician.UpdateDefaultUpdateTime()
		tu.update_time = &v
	}
	if tu.name != nil {
		if err := technician.NameValidator(*tu.name); err != nil {
			return 0, fmt.Errorf("ent: validator failed for field \"name\": %v", err)
		}
	}
	if tu.email != nil {
		if err := technician.EmailValidator(*tu.email); err != nil {
			return 0, fmt.Errorf("ent: validator failed for field \"email\": %v", err)
		}
	}
	return tu.sqlSave(ctx)
}
// Save executes the query and returns the number of rows/vertices matched by this operation.
Save executes the query and returns the number of rows/vertices matched by this operation.
// Save executes the query and returns the number of rows / vertices matched by this operation .
func (tu *TechnicianUpdate) Save(ctx context.Context) (int, error) {
	if tu.update_time == nil {
		v := technician.UpdateDefaultUpdateTime()
		tu.update_time = &v
	}
	if tu.name != nil {
		if err := technician.NameValidator(*tu.name); err != nil {
			return 0, fmt.Errorf("ent: validator failed for field \"name\": %v", err)
		}
	}
	if tu.email != nil {
		if err := technician.EmailValidator(*tu.email); err != nil {
			return 0, fmt.Errorf("ent: validator failed for field \"email\": %v", err)
		}
	}
	return tu.sqlSave(ctx)
}
func ( tu * TechnicianUpdate ) Save ( ctx context . Context ) ( int , error ) { if tu . update_time == nil { v := technician . UpdateDefaultUpdateTime ( ) tu . update_time = & v } if tu . name != nil { if err := technician . NameValidator ( * tu . name ) ; err != nil { return 0 , fmt . Errorf ( " \" \" " , err ) } } if tu . email != nil { if err := technician . EmailValidator ( * tu . email ) ; err != nil { return 0 , fmt . Errorf ( " \" \" " , err ) } } return tu . sqlSave ( ctx ) }
Save executes the query and returns the number of rows/vertices matched by this operation.
Save executes the query and returns the number of rows / vertices matched by this operation .