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

Method AddStoragePolicy

ent/node_update.go:188–194  ·  view source on GitHub ↗

AddStoragePolicy adds the "storage_policy" edges to the StoragePolicy entity.

(s ...*StoragePolicy)

Source from the content-addressed store, hash-verified

186
187// AddStoragePolicy adds the "storage_policy" edges to the StoragePolicy entity.
188func (nu *NodeUpdate) AddStoragePolicy(s ...*StoragePolicy) *NodeUpdate {
189 ids := make([]int, len(s))
190 for i := range s {
191 ids[i] = s[i].ID
192 }
193 return nu.AddStoragePolicyIDs(ids...)
194}
195
196// Mutation returns the NodeMutation object of the builder.
197func (nu *NodeUpdate) Mutation() *NodeMutation {

Callers

nothing calls this directly

Calls 1

AddStoragePolicyIDsMethod · 0.95

Tested by

no test coverage detected