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

Method AddStoragePolicyIDs

ent/mutation.go:7719–7726  ·  view source on GitHub ↗

AddStoragePolicyIDs adds the "storage_policy" edge to the StoragePolicy entity by ids.

(ids ...int)

Source from the content-addressed store, hash-verified

7717
7718// AddStoragePolicyIDs adds the "storage_policy" edge to the StoragePolicy entity by ids.
7719func (m *NodeMutation) AddStoragePolicyIDs(ids ...int) {
7720 if m.storage_policy == nil {
7721 m.storage_policy = make(map[int]struct{})
7722 }
7723 for i := range ids {
7724 m.storage_policy[ids[i]] = struct{}{}
7725 }
7726}
7727
7728// ClearStoragePolicy clears the "storage_policy" edge to the StoragePolicy entity.
7729func (m *NodeMutation) ClearStoragePolicy() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected