(ctx context.Context, file *ent.File, keys ...string)
| 736 | } |
| 737 | |
| 738 | func (f *fileClient) RemoveMetadata(ctx context.Context, file *ent.File, keys ...string) error { |
| 739 | if len(keys) == 0 { |
| 740 | return nil |
| 741 | } |
| 742 | ctx = schema.SkipSoftDelete(ctx) |
| 743 | groups, _ := f.batchInConditionMetadataName(intsets.MaxInt, 10, 1, keys) |
| 744 | for _, group := range groups { |
| 745 | if _, err := f.client.Metadata.Delete().Where(metadata.FileID(file.ID), group).Exec(ctx); err != nil { |
| 746 | return fmt.Errorf("failed to remove metadata: %v", err) |
| 747 | } |
| 748 | } |
| 749 | |
| 750 | return nil |
| 751 | } |
| 752 | |
| 753 | func (f *fileClient) UpgradePlaceholder(ctx context.Context, file *ent.File, modifiedAt *time.Time, entityId int, |
| 754 | entityType types.EntityType) error { |
nothing calls this directly
no test coverage detected