MCPcopy Create free account
hub / github.com/cloudreve/cloudreve / RemoveStoragePolicy

Method RemoveStoragePolicy

ent/node_update.go:214–220  ·  view source on GitHub ↗

RemoveStoragePolicy removes "storage_policy" edges to StoragePolicy entities.

(s ...*StoragePolicy)

Source from the content-addressed store, hash-verified

212
213// RemoveStoragePolicy removes "storage_policy" edges to StoragePolicy entities.
214func (nu *NodeUpdate) RemoveStoragePolicy(s ...*StoragePolicy) *NodeUpdate {
215 ids := make([]int, len(s))
216 for i := range s {
217 ids[i] = s[i].ID
218 }
219 return nu.RemoveStoragePolicyIDs(ids...)
220}
221
222// Save executes the query and returns the number of nodes affected by the update operation.
223func (nu *NodeUpdate) Save(ctx context.Context) (int, error) {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected